static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = new int[n];
            string[] s = Console.ReadLine().Split();
            for (int i = 0; i < n; i++)
            {
                a[i] = int.Parse(s[i]);
            }
            int q = int.Parse(Console.ReadLine());
            int[] br1 = new int[n];
            int[] br2 = new int[n];
            for (int i = 0; i < q; i++)
            {
                string[] s1 = Console.ReadLine().Split();
                br1[i] = int.Parse(s1[0]);
                br2[i] = int.Parse(s1[1]);
            }
            bool[] g = new bool[n];
            for (int i = 0; i < q; i++)
            {
                g[i] = true;
                int y = 0;
                int p = br1[i]-1;
                while (p < br2[i]-1)
                {
                    if (p + 1 > n - 1)
                    {
                        break;
                    }
                    if (a[p] <= a[p + 1])
                    {
                        p++;
                    }
                    else if (y < 1)
                    {
                        p++;
                        y++;
                    }
                    else
                    {
                        g[i] = false;
                        break;
                    }
                    

                }
            }
            for (int i = 0; i < q; i++)
            {
                if(g[i]==true)
                {
                    Console.WriteLine("da");

                }
                else
                {
                    Console.WriteLine("ne");
                }
            }

                Console.ReadLine();
            
        }
    }
}