#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
uintmax_t n, m;
if (scanf("%ju", &n
) != 1 || scanf("%ju", &m
) != 1)
for (uintmax_t product = n*m; product; --product)
for (uintmax_t i = n; i; --i)
if (product % i == 0 && product / i <= m)
printf("%ju %ju\n", i
, product
/ i
); }
I2luY2x1ZGUgPHN0ZGludC5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKaW50IG1haW4odm9pZCkKewogIHVpbnRtYXhfdCBuLCBtOwogIGlmIChzY2FuZigiJWp1IiwgJm4pICE9IDEgfHwgc2NhbmYoIiVqdSIsICZtKSAhPSAxKQogICAgZXhpdChFWElUX0ZBSUxVUkUpOwoKICBmb3IgKHVpbnRtYXhfdCBwcm9kdWN0ID0gbiptOyBwcm9kdWN0OyAtLXByb2R1Y3QpCiAgICBmb3IgKHVpbnRtYXhfdCBpID0gbjsgaTsgLS1pKQogICAgICBpZiAocHJvZHVjdCAlIGkgPT0gMCAmJiBwcm9kdWN0IC8gaSA8PSBtKQogICAgICAgICAgcHJpbnRmKCIlanUgJWp1XG4iLCBpLCBwcm9kdWN0IC8gaSk7Cn0K