#include <bits/stdc++.h>
using namespace std;
int n1[100005], m1[100005];
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  if (a < b) swap(a, b);
  cout << b << " ";
  cout << (a - b) / 2 << endl;
  return 0;
}
