#include<bits/stdc++.h>
using namespace std;
int main()
{
    int A,B,X,Y;
    cin>>A>>B;
    X = (A+B)/2;
    Y = (A-X);
    cout<<X<<" "<<Y<<endl;
    return 0;
}
    //Bismillah Hir Rehmanir Rahim
    //Allah knows best
    //#include<bits/stdc++.h>
    using namespace std;
    #include <climits>
    #include <iostream>
    #include <cstdio>
    #include <cstdlib>
    #include <algorithm>
    #include <iomanip>
    #include <cmath>
    #include <vector>
    #include <set>
    #include <map>
    #include <unordered_set>
    #include <unordered_map>
    #include <queue>
    #include <ctime>
    #include <cassert>
    #include <complex>
    #include <string>
    #include <cstring>
    #include <chrono>
    #include <random>
    #include <bitset>
    #define endl "\n"
    #define mini -10000000000000000
    #define f(i, a, n) for( i=a; i<n;i++)
    #define ll long long
    #define pi 3.141592653589793
    #define vi              vector<ll>
    #define si              set<ll>
    #define pb              push_back
    #define mp              make_pair
    #define mod             1000000007
    #define rr              return 0
    #define ff              first
    #define in              insert
    #define ss              second
    #define all(a) a.begin(), a.end()
    typedef pair<int, int> pii;
    #define setbits(x)      builtin_popcountll(x)
    #define zrbits(x)       builtin_ctzll(x)
    #define deb(x)          cout << #x << " = " << x << endl
    #define set_bit(x, idx) x = x|1LL<<idx
    #define check_bit(x, idx) min(x&(1LL<<idx),1LL)
    #define toggle_bit(x, idx) x = x^(1LL<<idx)
    #include <ext/pb_ds/assoc_container.hpp>
    #include <ext/pb_ds/tree_policy.hpp>
    using    namespace __gnu_pbds;
    #define multi_ordered_set       tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update>
    typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
    typedef tree<int, null_type, greater<int>, rb_tree_tag, tree_order_statistics_node_update> rordered_set;
    #ifdef DEBUG
    #define ios
    #define ok cerr << __LINE__ <<" is done "<<endl;
    #else
    #define ios ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    #define ok 
    #endif
    int main()
    {
        ios;
        #ifdef DEBUG
        freopen("in", "r", stdin);
        #endif 
        ll i,j,n,m,k;
        ll t=1;
    	//cin>>t;
    	while(t--)
    	{
           cin>>n>>m;
           cout<<n/m<<endl;
        }
        rr;
    }