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