/** * Created by YangYuan on 2017/12/8. */ public class Problem2007 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int m, n; while (scanner.hasNext()) { m = scanner.nextInt(); n = scanner.nextInt(); System.out.println(calculate(m)); } } public static int calculate(int x) { if (x % 2 == 0) return x * x; else return x * x * x; } }