#include using namespace std; int main(){ int A,B;//型が同じであれば変数の宣言はまとめて行える cin >> A >> B;//入力はまとめて受け取ることができる int x = 10 - A; int y = B - x; cout << x << " " << y << endl; return 0; }