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