#include <bits/stdc++.h>
using namespace std;
int main()
{
    int a, b, x, y, res1, res2;
    cin >> a >> b >> x >> y;
    res1 = a - x;
    res2 = b - y;
    if (res1 == 0 && res2 == 0)
    {
        cout << "nijedan";
    }
    else if (res1 != 0 && res2 == 0)
    {
        cout << "prvi";
    }
    else if (res1 == 0 && res2 != 0)
    {
        cout << "drugi";
    }
    else
    {
        cout << "nijedan";
    }
    return 0;
}