#include #include int main(void) { int A,B,x,y; std::cin >> A >> B; x = 10-A; y = B-x; std::cout << x << " " << y << std::endl; }