#include using namespace std; #define int long long #define INF 1000000000 int32_t main() { ios_base::sync_with_stdio( 0 ); cin.tie( 0 ); int n, a, b; cin >> n >> a >> b; pair p {0, 0}; int res=0; for( int x, i=1; i<=n; i++ ) { cin >> x; res ^= x%(min(a, b)+1); if( x > p.second ) p.second = x; if( p.second > p.first ) { swap( p.first, p.second ); } } //cout << res << " res\n"; if( a==b ) { if( res == 0 ) cout << "Varys"; else cout << "Petyr"; } else if( a>b ) { if( res != 0 ) cout << "Petyr"; else if( p.first > b ) cout << "Petyr"; else cout << "Varys"; } else { if( res == 0 ) cout << "Varys"; else { if( (p.first^res) < p.first ) { if( (p.first^res) > b || p.second > b ) cout << "Varys"; else cout << "Petyr"; } else if( p.first > b ) cout << "Varys"; else cout << "Petyr"; } } return 0; } /* 2 3 4 2 3 * 7 8 9 1 2 3 4 5 6 7 * * * * 2 3 4 2 3 00120524288524288012221105242890110 00123300100052428852428852428800220 Petyrcteam065@acm ~ $ ./stones 7 8 9 1 2 3 4 5 6 7 001234567052428852428801234567 00123456788001234560 Petyr */