#include using namespace std; typedef long long int LL; const int MAXN = 1000*1000; int A, B, n, k, m; int x[MAXN + 3]; int mex[MAXN + 3]; string p[3]; bool Brut(int curr){ int ind = -1; for(int i=0; i= m) { ind = i; break; } curr ^= x[ind]; for(int i=x[ind] - k; i < x[ind]; i++){ int new_mex = i%(k+1); if(((curr ^ new_mex) == 0) && i < m) return true; } return false; } int main(){ ios_base::sync_with_stdio(0); cin>>n>>A>>B; for(int i=0; i>x[i]; k = min(A, B); m = max(A, B); p[0] = "Petyr"; p[1] = "Varys"; int res = 0; int cnt = 0; for(int i=0; i= m; } if(A == B){ cout << ((res == 0) ? p[1] : p[0]) << "\n"; } else if(A > B){ if(cnt >= 1) cout << p[0] << "\n"; else cout << ((res == 0) ? p[1] : p[0]) << "\n"; } else { //A < B if(cnt >= 2) cout << p[1]; else if(cnt == 0) cout << ((res == 0) ? p[1] : p[0]) << "\n"; else { //cnt == 1 if(Brut(res)) cout << p[0] << "\n"; else cout << p[1] << "\n"; } } }