e-olymp
Competitions

Quick Start C: Loops, Arrays, Functions

Print squares and cubes

Given two integers a and b. Print the squares and cubes for all integers between a and b inclusively.

Input

First line contains two integers a and b (0ab10000).

Output

Print in the first line the squares for all integers between a and b inclusively in increasing order. Print in the second line the cubes for all integers between a and b inclusively in decreasing order.

Time limit 1 second
Memory limit 128 MiB
Input example #1
5 10
Output example #1
25 36 49 64 81 100 
1000 729 512 343 216 125 
Input example #2
120 123
Output example #2
14400 14641 14884 15129 
1860867 1815848 1771561 1728000