using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication32
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = new int[n];
            string[] s = Console.ReadLine().Split();
            int[] promene = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = int.Parse(s[i]);
                if (i != 0)
                {
                    if (a[i] < a[i - 1])
                    {
                        promene[i] = 1;
                    }
                    else
                    {
                        promene[i] = 0;
                    }
                }
                else
                {
                    promene[i] = 0;
                }
            }
            int q = int.Parse(Console.ReadLine());
            int t=0;
            while (t < q)
            {
                string[] s1 = Console.ReadLine().Split();
                int br1 = int.Parse(s1[0]);
                int br2 = int.Parse(s1[1]);
                bool b=true;
                int y = 0;
                for (int i = br1-1; i < br2-1; i++)
                {
                    y = y + promene[i];
                    if (y > 1)
                    {
                        b = false;
                    }
                }
                if (b == true)
                {
                    Console.WriteLine("da");
                }
                else
                {
                    Console.WriteLine("ne");
                }
                t++;
            }
            Console.ReadLine();
        }
    }
}