string line = Console.ReadLine();
			string[] data = line.Split(' ');
            int a = int.Parse(data[0]); 
            int b = int.Parse(data[1]); 
            line = Console.ReadLine();
			data = line.Split(' ');
            int x = int.Parse(data[0]); 
            int y = int.Parse(data[1]); 
            
            if(a-x>0 && b-y==0) Console.WriteLine("prvi");
            else if(a-x==0 && b-y>0) Console.WriteLine("drugi");
            else if(a-x==0 && b-y==0) Console.Write("nijedan");
            else if(a-x>0 && b-y>0) Console.WriteLine("?");
            
			Console.ReadKey(true);