#define _USE_MATH_DEFINES #include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <complex> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <limits> #include <climits> #include <cfloat> #include <functional> #include <iterator> using namespace std; unsigned xor128(){ static unsigned x=123456789,y=362436069,z=521288629,w=88675123; unsigned t; t=(x^(x<<11));x=y;y=z;z=w; return( w=(w^(w>>19))^(t^(t>>8)) ); } const int MAX = 1000000000; int main() { int n; cin >> n; for(;;){ int a = xor128() % (MAX * 2 + 1) - MAX; int b = n - a; if(-MAX <= b && b <= MAX){ string s = to_string(a); string t = to_string(b); if(s.find('7') == string::npos && t.find('7') == string::npos){ cout << a << ' ' << b << endl; return 0; } } } }