#include <bits/stdc++.h>
using namespace std;
long long int n, m, minn, maxx, r;
int main() {
  cin >> n >> m;
  minn = min(n, m);
  maxx = max(n, m);
  cout << minn << " ";
  r = maxx - minn;
  cout << r / 2;
}
