#include using namespace std; int main() { int a, b; cin >> a >> b; int x = 10 - a, y = b - x; cout << x << ' ' << y << endl; }