#include<bits/stdc++.h>
using namespace std;
#define debug(x) cerr<<#x<<' '<<x<<endl
#ifndef ONLINE_JUDGE
#define pia getchar
#else
#define pia nc
#endif
char nc(){
static char buf[1<<25],*p=buf,*q=buf;
if(p==q&&(q=(p=buf)+fread(buf,1,1<<25,stdin),p==q))return EOF;
return *p++;
}
template<class T>void rd(T&x){
short f=1;x=0;
char ch=pia();
while(!isdigit(ch)){
if(ch=='-')f=-1;
ch=pia();
}while(isdigit(ch)){
x=(x<<1)+(x<<3)+(ch^48);
ch=pia();
}x*=f;
}
template<class T>void wr(T x){
if(x<0)putchar('-'),x=-x;
if(x>=10)wr(x/10);
putchar(x%10+48);
}
#define int unsigned long long
int n,m,useless,k;
int x,G;
int cnt;
signed main(){
#ifndef ONLINE_JUDGE
freopen("testdata.in","r",stdin);
#endif
rd(n),rd(m),rd(useless),rd(k);
for(int i=1;i<=n;i++)rd(x),G|=x;
while(m--){
rd(x),rd(useless);
if(!(G>>x&1))cnt++,G|=1<<x;
}
int ans=1ull<<(k-cnt);
if(k-cnt==64)ans=0;
if(n==0)puts("18446744073709551616");
else wr(ans-n);
#ifndef ONLINE_JUDGE
cerr<<endl<<(double)clock()/CLOCKS_PER_SEC;
#endif
}