CF317D.Game with Powers

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Vasya and Petya wrote down all integers from 11 to nn to play the "powers" game ( nn can be quite large; however, Vasya and Petya are not confused by this fact).

Players choose numbers in turn (Vasya chooses first). If some number xx is chosen at the current turn, it is forbidden to choose xx or all of its other positive integer powers (that is, x2x^{2} , x3x^{3} , ...... ) at the next turns. For instance, if the number 99 is chosen at the first turn, one cannot choose 99 or 8181 later, while it is still allowed to choose 33 or 2727 . The one who cannot make a move loses.

Who wins if both Vasya and Petya play optimally?

输入格式

Input contains single integer nn ( 1<=n<=1091<=n<=10^{9} ).

输出格式

Print the name of the winner — "Vasya" or "Petya" (without quotes).

输入输出样例

  • 输入#1

    1
    

    输出#1

    Vasya
    
  • 输入#2

    2
    

    输出#2

    Petya
    
  • 输入#3

    8
    

    输出#3

    Petya
    

说明/提示

In the first sample Vasya will choose 1 and win immediately.

In the second sample no matter which number Vasya chooses during his first turn, Petya can choose the remaining number and win.

首页