#include <bits/stdc++.h>

using namespace std;

const int N = 100000;

struct scc_graph{
  int n;
  vector<vector<int> > graph;
  vector<vector<int> > inv_graph;
  vector<int> fr, to;
  vector<int> fn;
  vector<int> vis;
  vector<int> component;
  int col;
  void inv_dfs(int v)
  {
    vis[v] = 1;
    for (auto id : inv_graph[v])
    {
      int u = fr[id];
      if (!vis[u])
      {
        inv_dfs(u);
      }
    }
    fn.push_back(v);
  }
  void dfs(int v)
  {
    component[v] = col;
    for (auto id : graph[v])
    {
      int u = to[id];
      if (component[u] == -1)
      {
        dfs(u);
      }
    }
  }
  scc_graph(int _n)
  {
    n = _n;
    graph = vector<vector<int> >(n);
    inv_graph = vector<vector<int> >(n);
  }
  void add_edge(int v, int u)
  {
    graph[v].push_back(fr.size());
    inv_graph[u].push_back(fr.size());
    fr.push_back(v);
    to.push_back(u);
  }
  vector<vector<int> > scc()
  {
    vis = vector<int>(n);
    component = vector<int>(n, -1);
    fn = {};
    col = 0;
    for (int i = 0; i < n; i++)
    {
      if (!vis[i])
      {
        inv_dfs(i);
      }
    }
    reverse(fn.begin(), fn.end());
    for (auto i : fn)
    {
      if (component[i] == -1)
      {
        dfs(i);
        col++;
      }
    }
    vector<vector<int> > res(col);
    for (int i = 0; i < n; i++)
    {
      res[component[i]].push_back(i);
    }
    return res;
  }
};

int vertexid[N];
int L[N], R[N];
int fl;
vector<int> graph[N];

void build(int v, int l, int r)
{
  L[v] = l, R[v] = r;
  if (l + 1 == r)
  {
    vertexid[v] = l;
    return;
  }
  int m = (l + r) / 2;
  vertexid[v] = fl++;
  build(2 * v + 1, l, m);
  build(2 * v + 2, m, r);
  graph[vertexid[v]].push_back(vertexid[2 * v + 1]);
  graph[vertexid[v]].push_back(vertexid[2 * v + 2]);
}

void connect(int from, int l, int r, int v)
{
  if (r <= L[v] || R[v] <= l) return;
  if (l <= L[v] && R[v] <= r)
  {
    graph[from].push_back(vertexid[v]);
    return;
  }
  connect(from, l, r, 2 * v + 1);
  connect(from, l, r, 2 * v + 2);
}

int solve(int n, int d, vector<int> x, vector<int> y)
{
  vector<pair<int, int> > f;
  for (int i = 0; i < n; i++)
  {
    f.push_back({y[i], 2 * i + 1});
    f.push_back({x[i], 2 * i});
  }
  vector<int> pos(2 * n);
  sort(f.begin(), f.end());
  for (int i = 0; i < 2 * n; i++)
  {
    pos[f[i].second] = i;
  }
  fl = 2 * n;
  build(0, 0, 2 * n);
  for (int i = 0; i < 2 * n; i++)
  {
    int c = x[f[i].second / 2] + y[f[i].second / 2] - f[i].first;
    int mirror = pos[f[i].second ^ 1];
    int L, R;
    {
      int le = -1, ri = 2 * n;
      while (le + 1 < ri)
      {
        int mi = (le + ri) / 2;
        if (f[mi].first <= c - d) le = mi;
        else ri = mi;
      }
      L = ri;
    }
    {
      int le = -1, ri = 2 * n;
      while (le + 1 < ri)
      {
        int mi = (le + ri) / 2;
        if (f[mi].first >= c + d) ri = mi;
        else le = mi;
      }
      R = le;
    }
    if (L <= mirror - 1)
    {
      connect(i, L, mirror, 0);
    }
    if (mirror + 1 <= R)
    {
      connect(i, mirror + 1, R + 1, 0);
    }
  }
  scc_graph G(fl);
  for (int i = 0; i < fl; i++)
  {
    for (auto u : graph[i])
    {
      G.add_edge(i, u);
    }
  }
  vector<vector<int> > scc = G.scc();
  vector<int> wh(fl);
  for (int i = 0; i < scc.size(); i++)
  {
    for (int j = 0; j < scc[i].size(); j++)
    {
      wh[scc[i][j]] = i;
    }
  }
  for (int i = 0; i < fl; i++)
  {
    graph[i].clear();
  }
  for (int i = 0; i < n; i++)
  {
    if (wh[pos[2 * i]] == wh[pos[2 * i + 1]])
    {
      return 0;
    }
  }
  return 1;
}

int main()
{
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  for (int i = 0; i < n; i++)
  {
    cin >> x[i] >> y[i];
  }
  int L = 0, R = 1e9 + 2;
  while (L + 1 < R)
  {
    int M = (L + R) / 2;
    if (solve(n, M, x, y)) L = M;
    else R = M;
  }
  cout << L;
}

Measured memory_bytes: 40072