#include #include #include #include #include #include #include #include #include #include #define out(t) cout << (t) << "\n" using namespace std; typedef long long ll; typedef unsigned int uint; void swap(int &a, int &b) { a ^= b; b ^= a; a ^= b; } uint tzcnt(uint x) { x = ~x & (x - 1); x -= x >> 1 & 0x55555555; x = (x & 0x33333333) + (x >> 2 & 0x33333333); x = x + (x >> 4) & 0x0F0F0F0F; return x * 0x01010101 >> 24; } int main() { cin.tie(0); ios::sync_with_stdio(false); string n; cin >> n; int a = 0; int b = 0; for (int i = n.length() - 1; i >= 0; i--) { int x = n[i] - '0'; int k = n.length() - i - 1; if (x & 1) { a += (x / 2) * pow(10, k); b += (1 + x / 2) * pow(10, k); } else { a += (x / 2) * pow(10, k); b += (x / 2) * pow(10, k); } } cout << a << " " << b << "\n"; int ttttttt; cin >> ttttttt; }