#include <bits/stdc++.h>
using namespace std;
void printv(vector<int> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
}
unsigned long long summ(unsigned long long n) { return ((n * n) + n) / 2; }
bool isubseq(string s, string s1) {
  int ln = s1.length();
  int lll = s.length();
  int i = 0, j = 0;
  for (; i < ln && j < lll; i++) j += (s1[i] == s[j]);
  return j == lll;
}
bool incirc(double x, double y, double center_x, double center_y, double r) {
  return (x - center_x) * (x - center_x) + (y - center_y) * (y - center_y) <=
         r * r;
}
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  unsigned long long c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int a, b, different = 0, same = 0;
  cin >> a >> b;
  different = (a < b) ? a : b;
  same = abs(a - b) / 2;
  cout << different << " " << same << endl;
  return 0;
  return 0;
}
