#include <cstdio>
#include <cctype>
#define ull unsigned long long
using namespace std;
ull read()
{
ull x = 0;
char c = getchar();
for (; !isdigit(c); c = getchar())
continue;
for (; isdigit(c); c = getchar())
x = x * 10 + c - '0';
return x;
}
ull n,m,c,k;
ull buc=0;
bool tmp[64];
int main(){
n=read(),m=read(),c=read(),k=read();
for(int i=1;i<=n;i++){
ull ai=read();
buc|=ai;
}
for(int i=1;i<=m;i++){
ull pi=read(),qi=read();
tmp[pi]=1;
}
ull ans=1;
for(int i=0;i<k;i++)if(buc>>i&1)ans<<=1;else if(!tmp[i])ans<<=1;
printf("%llu",ans-m);
return 0;
}