#include<bits/stdc++.h>
using namespace std;
#define w(x) int x;cin>>x;while(x--)
#define ll long long int 
#define ld long double
#define pb push_back
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL)
#define vi vector<int>
#define inf 1e18
#define mod 998244353

void solve()
{
	ll no;
	cin>>no;
	ll k=5;
	vector<ll>v5;
	vector<ll>v3;
	while(k<=inf){
		v5.pb(k);
		k=k*5;
	}
	k=3;
	while(k<=inf){
		v3.pb(k);
		k=k*3;
	}
	int n=v3.size();
	int m=v5.size();
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			if(v3[i]+v5[j]==no){
				cout<<i+1<<" "<<j+1<<"\n";
				return;
			}
		}
	}
	cout<<"-1\n";
}
int main() {
/*#ifndef ONLINE_JUDGE
	freopen("input.txt", "r",stdin);
	freopen("output.text", "w",stdout);
#endif*/
	fast;
	/*ll t;
	cin>>t;
	while(t--)*/
	solve();
    return 0;
}
#include <iostream>
#include <climits>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <functional>
#include <algorithm>
#include <string>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
#include <cmath>
#include <random>
#include <bitset>
#include <cstdio>
#include <numeric>
#include <cassert>
#include <ctime>
using namespace std;
#define PB push_back
#define MP make_pair
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl
#define INF (1 << 28)
#define LLINF (1LL << 60)
#define MOD 998244353
//#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < n; i++)
#define llrep(i, n) for (ll i = 0; i < n; i++)
using ll = long long;
typedef pair<ll, ll> P;

int main()
{
    int n;
    cin>>n;
    if(floor(1.08*n)<206){
        cout << "Yay!" << endl;
    }
    else if(floor(1.08*n)==206){
        cout << "so-so" << endl;
    }
    else{
        cout << ":(" << endl;
    }
    return 0;
}