#include <bits/stdc++.h>
#include "testlib.h"

using namespace std;
 
typedef long long ll;
void gen_case(){
    ll K = opt<ll>("K");
    ll N = opt<ll>("N");
    ll f = opt<ll>("f");
    if(f==1)
    {
        cout<<N<<" "<<K<<endl;
        return;
    }
    ll k=rnd.next(1ll,K);
    ll n=rnd.next(1ll,N);
    cout<<n<<" "<<k<<endl;
}
signed main(int argc, char* argv[]) {
    registerGen(argc, argv, 1);
    gen_case();
    return 0;
}