#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
#define rep(i,n) for(int i=0;i<int(n);i++)
#define rep1(i,n) for(int i=1;i<=int(n);i++)
#define per(i,n) for(int i=int(n)-1;i>=0;i--)
#define per1(i,n) for(int i=int(n);i>0;i--)
#define all(c) c.begin(),c.end()
#define si(x) int(x.size())
#define pb emplace_back
#define fs first
#define sc second
template<class T> using V = vector<T>;
template<class T> using VV = vector<vector<T>>;
template<class T,class U> void chmax(T& x, U y){if(x<y) x=y;}
template<class T,class U> void chmin(T& x, U y){if(y<x) x=y;}
template<class T> void mkuni(V<T>& v){sort(all(v));v.erase(unique(all(v)),v.end());}
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){
	return o<<"("<<p.fs<<","<<p.sc<<")";
}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){
	o<<"{";
	for(const T& v:vc) o<<v<<",";
	o<<"}";
	return o;
}
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n-1); }

#ifdef LOCAL
#define show(x) cerr << "LINE" << __LINE__ << " : " << #x << " = " << (x) << endl
void dmpr(ostream& os){os<<endl;}
template<class T,class... Args>
void dmpr(ostream&os,const T&t,const Args&... args){
	os<<t<<" ~ ";
	dmpr(os,args...);
}
#define shows(...) cerr << "LINE" << __LINE__ << " : ";dmpr(cerr,##__VA_ARGS__)
#define dump(x) cerr << "LINE" << __LINE__ << " : " << #x << " = {";  \
	for(auto v: x) cerr << v << ","; cerr << "}" << endl;
#else
#define show(x) void(0)
#define dump(x) void(0)
#define shows(...) void(0)
#endif
template <class E>
struct SCC{
	V<int> id;
	VV<int> groups;

	int N;
	VV<E> G;
	V<int> ord,low;
	V<bool> inS;
	V<int> st;
    int I=0;

	void dfs(int v){
		ord[v] = low[v] = I++;
		st.pb(v); inS[v] = true;
		for(auto e: G[v]){
			int u = e.to;
			if(ord[u] == -1){
				dfs(u);
				chmin(low[v],low[u]);
			}else if(inS[u]){
				chmin(low[v],ord[u]);
			}
		}
		if(low[v] == ord[v]){
			V<int> group;
			while(true){
				int w = st.back(); st.pop_back();
				inS[w] = false;
				group.pb(w);
				if(w == v) break;
			}
			groups.pb(group);
		}
	}
	SCC(const VV<E>& G_) : N(G_.size()), G(G_), ord(N,-1), low(N), inS(N){
        id = V<int>(N);
		rep(i,N) if(ord[i] == -1) dfs(i);
		reverse(all(groups));
		rep(i,groups.size()){
			for(int v: groups[i]) id[v] = i;
		}
	}
};
struct twosat{
	struct E{int to;};
	int N;
	VV<E> G;

	twosat(int varnum):N(varnum),G(N+N){}

	void OR(int x,int xtype,int y,int ytype){
		cerr << "add " << x << ":" << xtype << " or " << y << ":" << ytype << endl;
		x = x*2 + xtype, y = y*2 + ytype;
		G[x^1].push_back({y});
		G[y^1].push_back({x});
	}
	void THEN(int x,int xtype,int y,int ytype){
		OR(x,1-xtype,y,ytype);
	}
	void EQ(int x,int xtype,int y,int ytype){
		THEN(x,xtype,y,ytype);
		THEN(y,ytype,x,xtype);
	}
	/*
		こっちは 0_1 / 2_3 / .. N+N-2_N+N-1 がペア
	*/
	void OR(int x, int y){
		G[x^1].push_back({y});
		G[y^1].push_back({x});
	}
	void THEN(int x,int y){
//		cerr << "THEN:" << x << " -> " << y << endl;
		OR(x^1,y);
	}
	void EQ(int x,int y){
		THEN(x,y);
		THEN(y,x);
	}
	V<int> solve(){		// select which type
		SCC<E> scc(G);
		rep(i,N) if(scc.id[i*2] == scc.id[i*2+1]) return {};
		V<int> res(N,-1);
		per(k,scc.groups.size()){
			for(int v: scc.groups[k]){
				if(res[v/2] == -1) res[v/2] = v%2;
			}
		}
		return res;
	}
};

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);		//DON'T USE scanf/printf/puts !!
	cout << fixed << setprecision(20);

	int N; cin >> N;
	V<int> X(N+N);
	rep(i,N+N) cin >> X[i];
	V<int> xs = X; mkuni(xs);

	V<int> idx(N+N); iota(all(idx),0);
	sort(all(idx),[&](int l,int r){return X[l]<X[r];});
	sort(all(X));

	auto can = [&](int D){
		int K = idx.size();
		twosat TS(N+K+K);
		int I = N;
		using P = pair<int,int>;
		map<P,int> mp;
		function<void(int,int,int)> dfs = [&](int l,int r,int k){
			mp[P(l,r)] = k;
			show(P(l,r)); shows("id = ",k);
			if(r-l == 1){
				TS.THEN(k*2,idx[l]^1);
				return;
			}
			int cl = ++I, cr = ++I;
			TS.THEN(k*2,cl*2); TS.THEN(k*2,cr*2);
			dfs(l,(l+r)/2,cl);
			dfs((l+r)/2,r,cr);
		};
		dfs(0,K,I);
		int l=0,r=0;
		rep(i,N+N){
			while(l != N+N && X[i]-X[l] >= D) l++;
			while(r != N+N && X[r]-X[i] < D) r++;
			if(false){
				int num = 0;
				rep(j,N+N) if(abs(X[i]-X[j])<D) num++;
				assert(num == r-l);
				for(int j=l;j<r;j++) if(i != j) TS.THEN(idx[i],idx[j]^1);
			}
			function<void(int,int,int,int)> seg = [&](int a,int b,int l,int r){
				int k = mp[P(l,r)];
				if(b<=l||r<=a) return;
				if(a<=l&&r<=b){
					TS.THEN(idx[i],k*2);
					return;
				}
				seg(a,b,l,(l+r)/2);
				seg(a,b,(l+r)/2,r);
			};
			seg(l,i,0,N+N);
			seg(i+1,r,0,N+N);
		}
		return !TS.solve().empty();
	};
	int lb = 0, ub = TEN(9)+1;
	while(ub-lb>1){
		int m = (lb+ub)/2;
		if(can(m)) lb = m;
		else ub = m;
	}
	cout << lb << endl;
}


Measured memory_bytes: 33564