#include #include using namespace atcoder; using namespace std; using ll=int; using ld=long double; ld pie=3.141592653589793; ll mod=998244353; ll inf=1009; int main(){ srand((unsigned)time(NULL)); ll n; cin >> n; for (ll i = 0; i >=0; i++) { ll a=rand()%n; string s=to_string(a); bool ok=true; for (ll j = 0; j < s.size(); j++) { if (s[j]=='7') { ok=false; break; } } if (!ok) { continue; } ll b=n-a; s=to_string(b); for (ll j = 0; j < s.size(); j++) { if (s[j]=='7') { ok=false; break; } } if (ok) { cout << a << ' ' << b << endl; return 0; } } }