#include using namespace std; typedef long long ll; const int mod = 1e9; bool ok(int n) { while (n) { if (n % 10 == 7)return false; n = n / 10; } return true; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; int a, b; srand(time(0)); do { int t = rand() % mod; a = t; b = n - a; } while (ok(a) || ok(b) ); cout << a << " " << b << endl; }