#include<bits/stdc++.h>
using namespace std;
#define speed           ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int             long long int
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vec             vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define inf             1e18
#define no_of_test(x)   int x; cin>>x; while(x--)
//Actual Code Is At The Top
int32_t main()
{   
	speed;
//	no_of_test(x)
	{  
       int n;
       cin>>n;
       int a=1,b=1;
       for(int i=1;i<=39;i++)
       {
         a=a*3;
         b=1;
          for(int j=1;j<=30;j++)
          {
             b=b*5;
             if(a+b==n)
             {
                cout<<i<<" "<<j<<'\n';
                return 0;
             }
             if(b>=2*b)
             break;
          }
          if(a>=2*a)
          break;
       }
       cout<<-1<<'\n';
	}
	return 0;
}
#include <bits/stdc++.h>

using namespace std;

#define ALL(x) x.begin(), x.end()
#define MP make_pair

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

int main(int argc, char *argv[]) {
#ifndef LOCAL
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
#endif

    vector<int> prime{3, 5, 7, 11};
    vector<int> v;
    for (int i = 1; i <= 5000; i++) {
        for (int &x : prime) {
            if (i % x == 0) {
                v.push_back(i * 2);
                break;
            }
        }
    }

    int n = 0;
    cin >> n;
    int g = 3 * 5 * 7 * 11;
    for (int i = 0; i < n - 1; i++) {
        cout << v[i] << ' ';
        g = __gcd(g, v[i]);
    }
    assert(g == 1);
    cout << 3 * 5 * 7 * 11 << '\n';

    return 0;
}
/**
 *  created: 2021/05/09  22:30:40
 *  compile: g++ sol.cpp -o sol.out -g -std=c++17 -Wall -Wextra -Wshadow -fsanitize=undefined -fsanitize=address -D_GLIBCXX_DEBUG -DLOCAL
**/