1 1 2 2
1000000000 1000000000
1
 1 1 1000000000 1000000000
100 1000000000
1
 1 1 10 18
5 6
5
 2 1 1000000000 2000000000
111 999999999
101 999999998
1
 4 13 400 600
13 30
1 19
1 160
1 113
58 73 15 319 194 362 128 157 336 162 77 90 96
 1 15 100 200
283 8
30 58 16 45 80 82 55 95 24 23 86 28 51 47 20
 3 2 300 400
24 68
13 65
15 113
127 177
 1 1 2 1
1 10
1
 4 2 7 15
10 9
4 4
9 3
4 10
1 6
 2 1 1000000000 2000000000
111 1000000000
101 1000000000
5
 2 1 1000000000 2000000000
111 999999998
101 999999998
1
 1 1 1000000000 1000000000
1 1000000000
1

1000000000
 -1
 5
 111
 1
 -1
 -1
 -1
 4
 101
 -1
 -1

    #include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<lli,lli> pll;
typedef std::vector<lli> vll;
typedef std::vector<pll> vpll;
typedef std::vector<bool> vbb;
typedef map<lli,lli>mll;
typedef set<lli> sll;
typedef multiset<lli> msll;

lli MOD=1e9 +7;
lli INF=1e18;
    #define forr(i,p,n) for(i=p; i<n; i++)
    #define be(a) a.begin(),a.end()
    #define mp make_pair
    #define um unordered_map
    #define eb emplace_back 
    #define pb push_back 
    #define F first
    #define S second
    #define all(a)     (a).begin(),(a).end()
    #define PI 3.14159265358979323846
    #define lb lower_bound
    #define ub upper_bound
    #define endl "\n"
#define deb(vari) cerr<<#vari<<" = "<<vari<<endl;
lli bitc(lli n,lli x){return ((n>>x)&1);}
lli __gcd(lli a,lli b){return b==0?a:__gcd(b,a%b);}
lli sub(lli a,lli b,lli p=MOD){return ((a%p)-(b%p)+p)%p;}
lli mult(lli a,lli b, lli p=MOD) {return ((a%p)*(b%p))%p;}
lli add(lli a, lli b, lli p=MOD) {return (a%p + b%p)%p;}
    // lli add(lli a,lli b,lli p=MOD){//if(a+b>=p){//return (a+b)-p;//  }//return a+b;// }
lli fpow(lli n, lli k, lli p = MOD) {lli r = 1; while(k > 0) {if (k & 1) r = r * n%p; n = n * n%p; k = k >> 1;} return r;}
lli inv(lli a, lli p = MOD) {return fpow(a, p - 2, p);}
lli fdiv(lli a,lli b,lli p=MOD){lli yinv=inv(b);lli ans=(a*yinv)%p;return ans;}
    template<typename T>
istream &operator>>(istream &in, vector<T> &a) {for (auto &item : a) {in >> item;}return in;}
    template<typename T,typename U>ostream &operator<<(ostream &out, pair<T,U> &a) {cout<<a.F<<" "<<a.S;return out;}
    template<typename T,typename U>
istream &operator>>(istream &out, pair<T,U> &a) {cin>>a.F>>a.S;return out;}
    template<typename T,typename U>
ostream &operator<<(ostream &out, map<T,U> &a) {for (auto &item : a) {out << item << endl;}return out;}
    template<typename T>
ostream &operator<<(ostream &out, vector<T> &a) {for (auto &item : a) {out << item << " ";}return out;}
    template<typename T>
ostream &operator<<(ostream &out, vector<vector<T>> &a) {for (auto &item : a) {out << item << "\n";}return out;}
    #define print(a) for(auto p:a) cout<<p<<"\n"; cout<<endl;
    #define read(a) for(auto &p:a)cin>>p>>endl;
void printmat(auto v,lli n,lli m){lli i,j;forr(i,0,n){forr(j,0,m){cout<<v[i][j]<<" ";}cout<<endl;}}
void printarr(auto v,lli n){
	lli i;
	forr(i,0,n){
		cout<<v[i]<<" ";
	}
	cout<<endl;
}
std::vector<bool> is_prime;
std::vector<lli> primes;
void sieve(lli n){is_prime.resize(n+2,true);primes.clear();lli p;for(p=2;p*p<=n;p++){if(is_prime[p]){lli i;for(i=p*p;i<=n;i+=p){is_prime[i]=false;}}}is_prime[0]=is_prime[1]=false;lli i;for(i=2;i<=n;i++){if(is_prime[i]){primes.eb(i);}}}
mll prime_factors(lli n){   mll s;lli i;lli tc=0;while(n%2==0){tc++;n/=2;}if(tc>0){s[2]=tc;}for(i=3;i<=sqrt(n);i+=2){tc=0;while(n%i==0){tc++;n/=i;}if(tc>0){s[i]=tc;}}if(n>2){s[n]+=1;}return s;}
    //FACTORIAL
std::vector<lli> fact_vec;
void fact_fun(lli n){fact_vec.resize(n+10);lli i;fact_vec[0]=1;for(i=1;i<=n+2;i++){fact_vec[i]=(fact_vec[i-1]*i)%MOD;}}


    // class Sol{
    // public: 			
    // 	Sol(){				
    // 	}       	
    // };

lli n,k,s,t;
vll g;
mll vtc;
bool cal(lli cap){
	lli i;
	forr(i,0,k-1){
		if(g[i+1]-g[i]<=cap){

		}else{
			return false;
		}
	}
	return true;
}
int main(){     
	lli i,j;    
	ios::sync_with_stdio(false);
	cin.tie(0);

	    	#ifndef ONLINE_JUDGE    
	freopen("input.txt", "r", stdin);
	freopen("output.txt"	, "w", stdout);
	    	#endif  	
	lli ti;
    	// cin>>ti; 
	ti=1;		
	while(ti--){	
		cin>>n>>k>>s>>t;
		forr(i,0,n){
			lli c,v;
			cin>>c>>v;
			if(!vtc.count(v)){
				vtc[v]=c;
			}else{
				vtc[v]=min(vtc[v],c);
			}
		}				
		g.resize(k);
		cin>>g;
		sort(all(g));
		lli ans=INF;
		lli start=vtc.begin()->F,end=vtc.rbegin()->F;		
		while(start<end){			
			lli mid=(start+end)/2;
			// cout<<start<<" "<<end<<endl;
			if(cal(mid)){
				start=mid+1;
				// auto it=vtc.ub(mid);
				// if(it!=vtc.begin()){
				// 	it--;
				// 	ans=min(ans,it->S);	
				// }
				if(vtc.count(mid)){
					ans=min(ans,vtc[mid]);
				}
			}else{
				end=mid-1;
			}
		}
		if(cal(start)){
			if(vtc.count(start)){
				ans=min(ans,vtc[start]);
			}
		}
		if(cal(end)){			
			if(vtc.count(end)){
				ans=min(ans,vtc[end]);
			}
		}
		if(ans==INF){
			ans=-1;
		}
		cout<<ans<<endl;

		
		
	}
}   
