#include using namespace std; int main(void){ int a, b; cin >> a >> b; cout << 10-a << ' ' << b-10+a << endl; return 0; }