#include<fstream>
#include<algorithm>
#define mp make_pair
using namespace std;
ifstream f("grendizer.in");
ofstream g("grendizer.out");
int n,m,i,x,y,r,sol;
pair<int,int>*it1,*it2,a[100100],b[100100];
int main()
{
f>>n>>m;
for(i=1;i<=n;++i)
{
f>>x>>y;
a[i]=mp(x+y,y);
b[i]=mp(x-y,y);
}
sort(a+1,a+n+1);
sort(b+1,b+n+1);
for(;m;--m)
{
f>>x>>y>>r;
it1=lower_bound(a+1,a+n+1,mp(x+y-r,y-r));
it2=upper_bound(a+1,a+n+1,mp(x+y-r,y));
sol=it2-it1;
it1=lower_bound(a+1,a+n+1,mp(x+y+r,y));
it2=upper_bound(a+1,a+n+1,mp(x+y+r,y+r));
sol+=it2-it1;
it1=upper_bound(b+1,b+n+1,mp(x-y+r,y-r));
it2=lower_bound(b+1,b+n+1,mp(x-y+r,y));
sol+=it2-it1;
it1=upper_bound(b+1,b+n+1,mp(x-y-r,y));
it2=lower_bound(b+1,b+n+1,mp(x-y-r,y+r));
sol+=it2-it1;
g<<sol<<'\n';
}
return 0;
}