#include <bits/stdc++.h>
template <class T>
using min_q = std::priority_queue<T, std::vector<T>, std::greater<T>>;
int comp_double(double a, double b) {
  if (fabs(a - b) <= (1e-10)) return 0;
}
using namespace std;
const int MOD = 1000000000;
bool is_C_S(char f) { return f >= 'a' && f <= 'z'; }
template <typename T>
void primefactors(T n) {
  while (n % 2 == 0) {
    cout << 2 << " ";
    n /= 2;
  }
  for (T i = 3; i * i <= n; i++) {
    while (n % i == 0) {
      cout << i << " ";
      n /= i;
    }
  }
  if (n > 2) cout << n << "\n";
}
vector<bool> prime;
void sprime() {
  prime.resize(21);
  fill(((prime).begin()), ((prime).end()), 1);
  prime[0] = prime[1] = 0;
  for (int p = 2; p * p <= 21; p++) {
    if (prime[p] == true) {
      for (int i = p * 2; i < 21; i += p) prime[i] = false;
    }
  }
}
template <typename T>
T power(T p, T b) {
  if (p == 0) return 1;
  return b * power(p - 1, b);
}
int primes[4] = {2, 3, 5, 7};
int n = 20;
int inc_exe(int i = 0, int d = 1, int sign = -1) {
  {
    if (i == 4)
      if (d == 1) return 0;
    return sign * (n / d);
  }
  return inc_exe(i + 1, d, sign) + inc_exe(i + 1, d * primes[i], sign * -1);
}
template <class T>
T gcd(T a, T b) {
  if (a % b)
    return gcd(b, a % b);
  else {
    return b;
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int a, b;
  cin >> a >> b;
  int x = min(a, b);
  a = max(a, b);
  a = abs(a - x);
  a /= 2;
  cout << x << " " << a << "\n";
  return 0;
}
