#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, v;
  cin >> x >> v;
  int min = 0;
  int max = 0;
  if (x > v) {
    max = x;
    min = v;
  } else {
    min = x;
    max = v;
  }
  cout << min << " " << (max - min) / 2;
  return 0;
}
