#include <cstdio>
#include <iostream>
#include <assert.h>

using namespace std;

int main()
{
    freopen("dices.in", "r", stdin);
    freopen("dices.out", "w", stdout);
    long long n;
    cin >> n;
    assert(1 <= n && n <= 1e8);
    cout << (n + 5) / 6 * 7 - n << " " << n * 6 << endl;
}