#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int A,B; cin >> A >> B; cout << 10-A << " " << B-(10-A) << endl; }