#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int diff = a < b ? a : b, same;
  if (a == diff)
    same = (b - diff) / 2;
  else
    same = (a - diff) / 2;
  cout << diff << " " << same;
}
