#include #include int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); uint_fast32_t A, B; std::cin >> A >> B; const uint_fast32_t x = 10 - A, y = B - x; std::cout << x << ' ' << y << '\n'; return 0; }