#include<bits/stdc++.h> using namespace std; int main(){ int n,m,k; cin>>n>>m>>k; cout<<n-1<<' '<<m-1; return 0; }