#include<bits/stdc++.h>
#include<iostream>
#include<stack>
#include<queue>
using namespace std;
#define ll long long 
#define pb push_back
#define ph push
// vector definition
#define vi vector<int>
#define vf vector<float>
#define vll vector<long long>
// set definition
#define si set<int>
#define sf set<float>
void solve(){
 	int a,b;
  cin>>a>>b;
  int x=(a+b)/2;
  int y=a-x;
  cout<<x<<" "<<y<<'\n';
}
int main(){
     cin.tie(0);
    cout.tie(0);
    int t;t=1;
    while(t--){
        solve();
    }
    return 0;
}
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
  int S,P;cin>>S>>P;
  for(int i=1;i*i<=P;i++)if(P%i==0&&i+P/i==S)return puts("Yes"),0;
  puts("No");
}