#include <bits/stdc++.h>

int main(){
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    int a, b, x, y;
    std::cin>>a>>b>>x>>y;
    if(a>x && b>y)
        std::cout<<"?";
    else if(a == x && b == y)
        std::cout<<"nijedan";
    else if(a > x)
        std::cout<<"prvi";
    else
        std::cout<<"drugi";
}