// Contest: AtCoder Regular Contest 104 (https://atcoder.jp/contests/arc104)
// Problem: A: Plus Minus (https://atcoder.jp/contests/arc104/tasks/arc104_a)


// region boilerplate
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <chrono>
#include <cstdint>
#include <deque>
#include <exception>
#include <forward_list>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#if __cplusplus >= 201703L
#   include <optional>
#   include <string_view>
#   include <variant>
#endif

using namespace std;

#if __cplusplus >= 201703L
#   define all(a)      begin(a),end(a)
#   define sz(x)       ((int)size(x))
#else
#   define all(a)      (a).begin(),(a).end()
#   define sz(x)       ((int)(x).size())
#endif

#define rep(a, b)      for(int a = 0; a < (b); ++a)
#define reps(a, b, c)  for(int a = (b); a < (c); ++a)
#define trav(a, b)     for(auto& a : b)

using ll = long long;
using ld = long double;
using u64 = uint64_t;
using u32 = uint32_t;

using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vpi = vector<pi>;

#if __cplusplus >= 201703L
#   define MAYBE_UNUSED [[maybe_unused]]
#else
#   define MAYBE_UNUSED
#endif

MAYBE_UNUSED static constexpr int INF = (int)1e9 + 5;
MAYBE_UNUSED static constexpr ll INFL = (ll)1e18 + 5;
MAYBE_UNUSED static mt19937 rng((u32)chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count());
//endregion

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int a, b; cin >> a >> b;
    int y = (a - b) / 2;
    cout << (a - y) << ' ' << y << '\n';

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
using ll = long long;
using P = tuple<ll, ll, int>;

int main() {
    int n; cin >> n;
    vector<P> ps;
    rep(i, n) {
        ll x, y;
        cin >> x >> y;
        ps.emplace_back(x, y, i);
    }

    vector<bool> pushed(n);
    vector<P> use;
    auto push = [&]() -> void {
        rep(i, 3) {
            auto[x, y, id] = ps[i];
            if(pushed[id]) continue;
            use.push_back(ps[i]);
            pushed[id] = true;
        }
        rep(_i, 3) {
            int i = n - 1 - _i;
            auto[x, y, id] = ps[i];
            if(pushed[id]) continue;
            use.push_back(ps[i]);
            pushed[id] = true;
        }
    };

    sort(ps.begin(), ps.end());
    push();
    sort(ps.begin(), ps.end(), [&](auto a, auto b) {
        auto[x, y, i] = a;
        auto[xb, yb, ib] = b;
        return y < yb;
    });
    push();

    vector<int> dist;
    for(auto &[x, y, i] : use) {
        for(auto &[x2, y2, i2] : use) {
            if(i == i2) continue;
            ll d = max(abs(x - x2), abs(y - y2));
            dist.push_back(d);
        }
    }

    sort(dist.rbegin(), dist.rend());

    cout << dist[2] << '\n';
    return 0;
}
