#include <bits/stdc++.h>
using namespace std;
ifstream in("zc.in");
ofstream out("zc.out");
struct punct
{
int x,y;
};
vector<punct>lin,col;
vector<punct>aux;
int n,m;
const int dl[] = {-2,-1,-1,-1,0,0,0,0,0,1,1,1,2};
const int dc[] = {0,-1,0,1,-2,-1,0,1,2,-1,0,1,0};
long long ans;
bool cmpl(punct A,punct B)
{
if (A.y != B.y)
return A.y < B.y;
else
return A.x < B.x;
}
bool cmpc(punct A,punct B)
{
if (A.x != B.x)
return A.x < B.x;
else
return A.y < B.y;
}
int bsc(int l,int c)
{
int st = -1,pas = 1 << 20;
while (pas != 0)
{
if (st + pas < col.size() and (col[st + pas].x < l or (col[st + pas].x == l and col[st + pas].y <= c)))
st += pas;
pas /= 2;
}
return st + 1;
}
int bsl(int c,int l)
{
int st = -1,pas = 1 << 20;
while (pas != 0)
{
if (st + pas < lin.size() and (lin[st + pas].y < c or (lin[st + pas].y == c and lin[st + pas].x <= l)))
st += pas;
pas /= 2;
}
return st + 1;
}
vector<punct>remake(vector<punct>v)
{
aux.clear();
aux.push_back(v[0]);
for (int i = 1; i < v.size(); i++)
if (v[i].x != v[i - 1].x or v[i].y != v[i - 1].y)
aux.push_back(v[i]);
return aux;
}
int main()
{
in >> n >> m;
for (int i = 1; i <= n; i++)
{
int x,y;
in >> x >> y;
punct aux;
for (int j = 0; j < 13; j++)
{
aux.x = x + dc[j];
aux.y = y + dl[j];
lin.push_back(aux);
col.push_back(aux);
}
}
sort(lin.begin(),lin.end(),cmpl);
sort(col.begin(),col.end(),cmpc);
lin = remake(lin);
col = remake(col);
long long x = 0,y = 0;
while (m--)
{
char ch;
long long s;
in >> ch >> s;
if (ch == 'N')
{
long long st = y,dr = y + s;
long long nr1 = bsc(x,st),nr2 = bsc(x,dr);
ans += (nr2 - nr1);
if (x == 0 and st < 0 and dr >= 0)
ans--;
y += s;
}
else if (ch == 'S')
{
long long dr = y - 1,st = y - s - 1;
long long nr1 = bsc(x,st),nr2 = bsc(x,dr);
ans += (nr2 - nr1);
if (x == 0 and st < 0 and dr >= 0)
ans--;
y -= s;
}
else if (ch == 'E')
{
long long st = x,dr = x + s;
long long nr1 = bsl(y,st),nr2 = bsl(y,dr);
ans += (nr2 - nr1);
if (y == 0 and st < 0 and dr >= 0)
ans--;
x += s;
}
else
{
long long dr = x - 1,st = x - s - 1;
long long nr1 = bsl(y,st),nr2 = bsl(y,dr);
ans += (nr2 - nr1);
if (y == 0 and st < 0 and dr >= 0)
ans--;
x -= s;
}
}
out << ans;
return 0;
}