fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class Main {
  8. public static void main(String[] args) {
  9. Scanner in = new Scanner(System.in);
  10. String s = in.next();
  11. int a = Integer.parseInt(s);
  12. if(a%3==0)
  13. System.out.println("YES");
  14. else
  15. System.out.println("NO");
  16. }
  17. }
Success #stdin #stdout 0.07s 711680KB
stdin
33
stdout
YES