#include <iostream>
using namespace std;
int main()
{
    int x, y;
    int sx, sy;


    cin >> x;
    cin >> y;
    cin >> sx;
    cin >> sy;
    int a = sx - x;
    int b = sy - y;
    if (a == 0&&b==0)
    {
        cout << "nijedan";
    }
    if (a > 0 && b == 0)
    {
        cout << "prvi";
    }
    if (a == 0 && b > 0)
    {
        cout << "drugi";
    }
    if (a > 0 && b > 0)
    {
        cout << "?";
    }
}