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