#include<iostream>

using namespace std;

int main()
{
	
	int a,b;
	cin>>a>>b;
	int x=(a+b)/2;
	cout<<x<<" "<<a-x<<endl;
	
	
	
	return 0;
 } 
#include <iostream>
using namespace std;
int main(void){
    int a,b;
    cin >> a >> b;
   a = a / b;
   cout << a << endl;
}
