#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n,m,k; cin>>n>>m>>k; ll i=k/n,j=k%m; cout<<i<<" "<<j; return 0; }