#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, mn, mn1, mn2;
  cin >> a >> b;
  mn = (a + b) / 2;
  mn1 = (a - b) / 2;
  mn2 = (b - a) / 2;
  if (a == b) cout << mn << " " << 0;
  if (a > b) cout << b << " " << mn1;
  if (a < b) cout << a << " " << mn2;
  return 0;
}
