// ========================
// Compilador online da OBI
// ========================

#include <bits/stdc++.h>
using namespace std;

#define int long long

void solve() {
    int n; cin >> n;
    //6(x + y) + y = n

    int y = n % 6;
    int x = (n - 7 * y) / 6;

    if(x < 0) {
        cout << -1 << '\n';
        return;
    }
    cout << x << ' ' << y << '\n';
}

signed main() {
    // comandos para agilizar entrada/saída
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    solve();

    // Digite seu código aqui, por exemplo:
    // cout << "resposta" << endl;

    return 0;
}