#include <iostream>

using namespace std;

int main()
{
    int a, b, x, y;
    cin >> a >> b >> x >> y;

    if(a>100 || a<0 || b>100 || b<0 || x>a || y>b || x<0 || y<0)
        return 0;

    if(a+b==x+y)
        cout << "nijedan";
    else if(a>x && b==y)
        cout << "prvi";
    else if(a==x && b>y)
        cout << "drugi";
    else
        cout << "?";

    return 0;
}