#include <iostream>
using namespace std;
int main()
{
    for (int i = 1; i <= 50; i++)
    {
        for (int j = 50; j >= i; j--)
        {
            if ((i + j) * (j - i + 1) == 472)
            {
                cout << i << " " << j << endl;
            }
        }
    }
    return 0;
}