#include <iostream>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
for (long long int i = a; i < b+1; i++)
cout << i * i << ' ';
cout << endl;
for (long long int j = b; j > a-1; j--)
cout << j * j * j << ' ';
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgYSxiOwoJY2luID4+IGEgPj4gYjsKCWZvciAobG9uZyBsb25nIGludCBpID0gYTsgaSA8IGIrMTsgaSsrKQoJCWNvdXQgPDwgaSAqIGkgPDwgJyAnOwoJY291dCA8PCBlbmRsOwoJZm9yIChsb25nIGxvbmcgaW50IGogPSBiOyBqID4gYS0xOyBqLS0pCgkJY291dCA8PCBqICogaiAqIGogPDwgJyAnOwoJcmV0dXJuIDA7Cn0=