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