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