#include<iostream> using namespace std; int main() { int t; int j; int tu; int g; cin>>t>>j; tu=j/2-t; g=t-tu; cout<<tu<<" "<<g<<endl; }