#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solve() {
    int n, m, ggg;
    cin >> n >> m >> ggg;
    cout << max(n - 1, m - n) << '\n';
    cout << 1 << '\n';
}

signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    //cin >> t;
    while (t--) solve();
}
