#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int a,b;cin>>a>>b; int x,y; x= 10-a; y= b-x; cout << x <<' '<