#include #include #include #include std::vector> res = { {1, 0}, {31, 2147483647}, {465, 64424509410}, {4495, 934155386445}, {31465, 8718783606820}, {169911, 58851789346035}, {736281, 306029304599382}, {2629575, 1275122102497425}, {7888725, 4371847208562600}, {20160075, 12569060724617475}, {44352165, 30724370660176050}, {84672315, 64521178386369705}, {141120525, 117311233429763100}, {206253075, 185742786263791575}, {265182525, 257182319442172950}, {300540195, 312292816465495725}, {300540195, 333112337563195440}, {265182525, 312292816465495725}, {206253075, 257182319442172950}, {141120525, 185742786263791575}, {84672315, 117311233429763100}, {44352165, 64521178386369705}, {20160075, 30724370660176050}, {7888725, 12569060724617475}, {2629575, 4371847208562600}, {736281, 1275122102497425}, {169911, 306029304599382}, {31465, 58851789346035}, {4495, 8718783606820}, {465, 934155386445}, {31, 64424509410}, {1, 2147483647} }; int main() { int x; scanf("%d", &x); if (x > 31) return puts("0 0"), 0; printf("%jd %jd\n", res[x].first, res[x].second); }