import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int g = n % 10; int s = n / 10 % 10; int b = n / 100; int s1 = g * g * g + s * s * s + b * b * b; if(n == s1){ System.out.println("YES"); }else{ System.out.println("NO"); } sc.close(); } } /************************************************************** Problem: 1671 User: admin Language: Java Result: Accepted Time:643 ms Memory:39936 kb ****************************************************************/