Game of Stones


Submit solution

Points: 100
Time limit: 2.0s
Memory limit: 1G

Problem type
Allowed languages
Assembly, Awk, C, C++, Java, Perl, Python

Two players, Petyr and Varys, play a game in which players remove stones from \(N\) piles in alternating turns. Petyr, in his turn, can remove at most \(A\) stones from any pile. Varys, in his turn, can remove at most \(B\) stones from any pile. Each player has to remove at least one stone in his turn. The player who removes the last stone wins.

The game has already started and it is Petyr's turn now. Your task is to determine whether he can win the game if both he and Varys play the game in the best possible way.

Input Specification

The first input line contains three integers \(N\), \(A\), and \(B\) \((1 \leq N \leq 10^5\) and \(1 \leq A,B \leq 10^5)\). \(N\) describes the number of piles and \(A\), \(B\) represent Petyr's and Varys' restrictions. The second line contains \(N\) integers \(X_1,\ldots ,X_N\) \((1 \leq X_i \leq 10^6)\) specifying the current number of stones in all piles.

Output Specification

Output the name of the winner.

Sample Test Cases

Input
2 3 4
2 3
Output
Petyr

Input
7 8 9
1 2 3 4 5 6 7
Output
Varys

Comments

There are no comments at the moment.