fork download
  1. import java.util.*;
  2. import java.io.*;
  3. import java.math.*;
  4. class Ideone
  5. {
  6. public static void main (String[] args)
  7. {
  8. Scanner sc = new Scanner(System.in);
  9. BigInteger n = new BigInteger(sc.nextLine());
  10. if(!n.equals(BigInteger.ZERO) && n.and(n.subtract(BigInteger.ONE)).equals(BigInteger.ZERO)){
  11. System.out.println("yes");
  12. } else {
  13. System.out.println("no");
  14. }
  15. }
  16. }
Success #stdin #stdout 0.11s 35752KB
stdin
36893488147419103232
stdout
yes