#include <bits/stdc++.h>
using namespace std;
void SOLVE(int, int);
int main() {
  int A, B;
  cin >> A >> B;
  SOLVE(A, B);
  return 0;
}
void SOLVE(int A, int B) {
  int T1 = min(A, B);
  int T2 = (A + B) / 2;
  cout << T1 << " " << abs(T2 - T1) << endl;
}
