#include<bits/stdc++.h> using namespace std; int n,x; int main() { cin>>n>>x; int s=x/(n-1); cout<<s+x-1<<' '<<s+x; }