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