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