#include<fstream>
int main(){
    std::ifstream fin("INPUT.TXT");
    std::ofstream fout("OUTPUT.TXT");
    if (fin.is_open()){
        int a, b;
        fin >> a, b;
        fout << (b-1) << " " << (a-1);
    }
    fin.close();
    fout.close();
    return 0;
}