#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

#define int long long
#define endl "\n"
#define ff first
#define ss second
#define ordered_set tree<int, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update>
#define all(x) x.begin(), x.end()

const int INF = 1e18;


void solve() {

    int n, m, tgg;
    cin >> n >> m >> tgg;

    cout << m - (n - 1) << " " << 1 << endl;

}

signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int TN;
    TN = 1;
//    cin >> TN;

    while (TN--) {
        solve();
    }

}
