#include <bits/stdc++.h>
int main() {
  int a, b, n, m = 0;
  scanf("%d %d", &a, &b);
  if (a > b) {
    n = b;
    m = a;
  } else {
    n = a;
    m = b;
  }
  m -= n;
  if (m > 1)
    m /= 2;
  else
    m = 0;
  printf("%d %d\n", n, m);
  return 0;
}
