#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const ll N = 2000 + 5;

vector<ll> g[N], gr[N];

vector<ll> order;


void solve() {
    ll n, m, G;
    cin >> n >> m >> G;
    cout << n - 1 << " " << 1 << '\n';
}

int main() {
    int test = 1;
    // cin >> test;
    while (test--) {
        solve();
    }
}



