Competitions

# Week 3: November 23 – 29. For Loop. Part 1

# 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** (**0** ≤ **a** ≤ **b** ≤ **10000**).

#### 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.

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