#include using namespace std; using ll =long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int A,B; cin>>A>>B; cout<<10-A<<" "<<(B+A-10)<<"\n"; }