#include using namespace std; void solve(){ int a, b, x, y; cin >> a >> b; x = 10 - a; y = abs(b - x); cout << x << " " << y << endl; } int main(){ solve(); return 0; }