#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, q, w, p, m, n, k, l;
string s, ss, rez;
vector<long long> v;
int main() {
  cin >> a >> b;
  cout << min(a, b) << ' ' << (max(a, b) - min(a, b)) / 2;
}
