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