#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;
const int N=1e4;
inline ull read(){
int x=0,f=1;char ch=getchar();
while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=getchar();}
while (ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}
return x*f;
}
ull n,m,c,k,cnt,ans;
bool MLE[100];
ull AC=0;
int main(){
n=read(),m=read(),c=read(),k=cnt=read();
if(!n&&!m&&k==64){
cout<<"18446744073709551616";
return 0;
}
for(int i=1;i<=n;i++){
ull x=read();
AC|=x;
}
for(int i=1;i<=m;i++){
ull p=read(),q=read();
if(!((AC>>p)&1)&&MLE[p]==0){
cnt--;
MLE[p]=1;
}
}
ull ans=(1ull<<cnt)-n;
cout<<ans;
}