#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i,a,b) for(long long i=(a);i<(b);++i) #define per(i,a,b) for(long long i=b-1LL;i>=(a);--i) #define clr(a, b) memset((a), (b) ,sizeof(a)) #define ctos(c) string(1,c) #define print(x) cout<<#x<<" = "<> 19)) ^ (t ^ (t >> 8)); } string ntos(long long n){ string s; stringstream ss; ss << n; ss >> s; return s; } ll check(string s){ rep(i,0,s.sz){ if(s[i] == '7')return 0; } return 1; } int main() { int n; cin>>n; rep(i,0,10000){ ll a = xor128() % 100000000; ll b = n-a; if(check(ntos(a))==1&&check(ntos(b))==1){ cout << a << " " << b << endl; return 0; } } cout << 0 << " " << n << endl; return 0; }