class Squares {

    static int square (int i) {
	return i * i;
    }
    static int cube (int i) {
	return i * i * i;
    }

    public static void main (String args[]) {
	int i;
        int start;
        int end;

	if (args.length > 0) {
	    try {
		start = Integer.parseInt(args[0]);
	    } catch (NumberFormatException e) {
		start = 1;
	    }
	} else {
	    start = 1;
	}

	if (args.length > 1) {
	    try {
		end = Integer.parseInt(args[1]);
	    } catch (NumberFormatException e) {
		end = 10;
	    }
	} else {
	    end = 10;
	}

	System.out.println ("i\ti^2");
	for (i=start; i <= end; i++) {
	    System.out.println(Integer.toString(i) + "\t" 
			       + Integer.toString (cube(i)));
	}
    }
}
