#include <bits/stdc++.h>
using namespace std;
ifstream fin("zc.in");
ofstream fout("zc.out");
vector <pair <int,int>> capc1;
vector <pair <int,int>> capc2;
int addx[14]={0,1,0,-1, 0,2,0,-2,0,1,-1, 1,-1};
int addy[14]={0,0,1, 0,-1,0,2, 0,-2,1,-1,-1, 1};
int n, m, x, y, dim, sol, st, dr;
char c;
int main()
{
ios::sync_with_stdio(false);
fin.tie(NULL);
fout.tie(NULL);
fin >> n >> m;
for(int i=1; i<=n; i++)
{
fin >> x >> y;
for(int j=0; j<13; j++)
{
if(addx[j]+x || addy[j]+y)
{
capc1.push_back(make_pair(addx[j]+x,addy[j]+y));
capc2.push_back(make_pair(addy[j]+y,addx[j]+x));
}
}
}
vector <pair <int,int>> :: iterator it;
sort(capc1.begin(),capc1.end());
sort(capc2.begin(),capc2.end());
capc1.resize(unique(capc1.begin(),capc1.end())-capc1.begin());
capc2.resize(unique(capc2.begin(),capc2.end())-capc2.begin());
/*
for(pair<int,int> a:capc1)
cout << a.first << ' ' << a.second << '\n';
*/
x = 0;
y = 0;
for (int i=1; i<=m; ++i)
{
fin >> c >> dim;
if (c=='N')
{
st=lower_bound (capc1.begin (),capc1.end (),make_pair (x,y+1))-capc1.begin ();
dr=upper_bound (capc1.begin (),capc1.end (),make_pair (x,y+dim))-capc1.begin ();
if (st<=dr && capc1[st].first==x && y<=capc1[st].second && capc1[st].second<=y+dim)
sol+=dr-st;
y+=dim;
}
else if (c=='S')
{
st=lower_bound (capc1.begin (),capc1.end (),make_pair (x,y-dim))-capc1.begin ();
dr=upper_bound (capc1.begin (),capc1.end (),make_pair (x,y-1))-capc1.begin ();
if (st<=dr && capc1[st].first==x && y-dim<=capc1[st].second && capc1[st].second<=y)
sol+=dr-st;
y-=dim;
}
else if (c=='E')
{
st=lower_bound (capc2.begin (),capc2.end (),make_pair (y,x+1))-capc2.begin ();
dr=upper_bound (capc2.begin (),capc2.end (),make_pair (y,x+dim))-capc2.begin ();
if (st<=dr && capc2[st].first==y && x<=capc2[st].second && capc2[st].second<=x+dim)
sol+=dr-st;
x+=dim;
}
else if (c=='V')
{
st=lower_bound (capc2.begin (),capc2.end (),make_pair (y,x-dim))-capc2.begin ();
dr=upper_bound (capc2.begin (),capc2.end (),make_pair (y,x-1))-capc2.begin ();
if(st<=dr && capc2[st].first==y && x-dim<=capc2[st].second&& capc2[st].second<=x)
sol+=dr-st;
x-=dim;
}
}
fout << sol;
fin.close();
fout.close();
return 0;
}