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