• [A] Demon

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • There are 99999 demons in hell numbered from 1 to 99999.Some exceptionally powerful demon called the demon commanding.Because the demon commanding create by lucifer and the other demons create by demon commanding.How do we know this demon is demon commanding?if this demon's number abcd equal a^a+b^b+c^c+d^d this is the demon commanding.These demon commandings have a rank.The smaller of number, the higher of rank.
  • 输入
  • each line intput an integer N(1<=N<=99999)
  • 输出
  • if this demon is demon commanding output Yes and his rank.Or output No.
  • 样例输入
  • 1
    2
    3
  • 样例输出
  • Yes 1
    No
    No
    
  • 提示
  • 来源
  • Lucifer
  • 操作

显示春菜