#include <bits/stdc++.h>

#define F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

const int N = 20000 + 10;
const int MOD = 1000000007;
const int LOG = 20;
const int INF = 1000000010;
const int delta = 11353;

int n, X[N], ind[N], segout[N << 2], segin[N << 2], pnt, COM[N];
vi G[N * 20], Gin[N * 20], ft;
int mark[N * 20];

bool cmp(int x, int y){
	return X[x] < X[y];
}

int Not(int a){
	if(a > 2 * n) a -= 2 * n;
	else a += 2 * n;
	return a;
}

void build(int id, int l, int r){
	if (r - l == 1){
		segout[id] = ++pnt;
		G[segout[id]].pb(Not(ind[l]));
		Gin[Not(ind[l])].pb(segout[id]);
		segin[id] = ++pnt;
		G[ind[l]].pb(segin[id]);
		Gin[segin[id]].pb(ind[l]);
		return;
	}
	int md = (l + r) >> 1;
	build(id << 1, l, md);
	build(id << 1 | 1, md, r);
	segout[id] = ++pnt;
	G[segout[id]].pb(segout[id << 1]);
	G[segout[id]].pb(segout[id << 1 | 1]);
	Gin[segout[id << 1]].pb(segout[id]);
	Gin[segout[id << 1 | 1]].pb(segout[id]);
	segin[id] = ++pnt;
	G[segin[id << 1]].pb(segin[id]);
	G[segin[id << 1 | 1]].pb(segin[id]);
	Gin[segin[id]].pb(segin[id << 1]);
	Gin[segin[id]].pb(segin[id << 1 | 1]);
}

void DFS(int v){
	mark[v] = 1;
	for (auto u:G[v]){
		if (!mark[u]) DFS(u);
	}
	ft.pb(v);
}

void DFS2(int v, int c){
	mark[v] = 1;
	COM[v] = c;
	for (auto u:Gin[v]){
		if (!mark[u]) DFS2(u, c);
	}
}

void add(int id, int lq, int rq, bool f, int x, int l, int r){
	if (rq <= l || r <= lq) return;
	if (lq <= l && r <= rq){
		if (f == 0) G[x].pb(segout[id]), Gin[segout[id]].pb(x);
		else G[segin[id]].pb(x), Gin[x].pb(segin[id]);
		return;
	}
	int md = (l + r) >> 1;
	add(id << 1, lq, rq, f, x, l, md);
	add(id << 1 | 1, lq, rq, f, x, md, r);
}

void addE(int x, int y){
	G[Not(x)].pb(y);
	Gin[y].pb(Not(x));
	G[Not(y)].pb(x);
	Gin[x].pb(Not(y));
}

bool check(int x){
	pnt = 4 * n;
	memset(mark, 0, sizeof mark);
	for (int i = 0; i < N * 20; i++) G[i].clear(), Gin[i].clear();
	ft.clear();
	build(1, 1, 2 * n + 1);
	for (int i = 1; i <= n; i++){
		int L = 2 * i - 1, R = 2 * i;
		addE(Not(L), Not(R));
		addE(L, R);
	}
	X[0] = -INF;
	X[2 * n + 1] = INF;
	for (int i = 1; i <= 2 * n; i++){
		int l = 0, r = i;
		while (r - l > 1){
			int md = (l + r) >> 1;
			if (abs(X[ind[md]] - X[ind[i]]) < x)r = md;
			else l = md;
		}
		//cout << i << ' ' << r << '\n';
		if (r != i) add(1, r, i, 0, ind[i], 1, 2 * n + 1), add(1, r, i, 1, Not(ind[i]), 1, 2 * n + 1);
		l = i, r = 2 * n + 1;
		while (r - l > 1){
			int md = (l + r) >> 1;
			if (abs(X[ind[md]] - X[ind[i]]) < x) l = md;
			else r = md;
		}
		//cout << i << ' ' << l << '\n';
		if (l != i) add(1, i + 1, l + 1, 0, ind[i], 1, 2 * n + 1), add(1, i + 1, l + 1, 1, Not(ind[i]), 1, 2 * n + 1);
	}
	for (int i = 1; i <= pnt; i++){
		if (!mark[i]) DFS(i);
	}
	reverse(all(ft));
	memset(mark, 0, sizeof mark);
	int cm = 0;
	for (auto u:ft){
		if (!mark[u]) DFS2(u, ++cm);
	}
	for (int i = 1; i <= 2 * n; i++) if (COM[i] == COM[i + 2 * n]) return 0;
	return 1;
}

int32_t main(){
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cin >> n;
	for (int i = 1; i <= 2 * n; i++){
		cin >> X[i];
		ind[i] = i;
	}
	sort(ind + 1, ind + 2 * n + 1, cmp);
	int l = -1, r = INF;
	while (r - l > 1){
		int md = (l + r) >> 1;
		if (check(md)) l = md;
		else r = md;
	}
	//cout << check(5);
	cout << l;
	//for (int i = 0; i <= 6; i++) cout << i << ' ' <<check(i) << '\n';

	return 0;
}


Measured memory_bytes: 59252