#ifndef __clang__
#pragma GCC optimize "-O3"
#pragma GCC target "tune=native"
#endif
#ifdef ONLINE_JUDGE
#define NDEBUG 1
#endif
#include <stdio.h>
#include <bits/stdc++.h>

#define DESTRUCT2(p, a, b)                      \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);

#define DESTRUCT3(p, a, b, c)                   \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);

#define DESTRUCT4(p, a, b, c, d)                \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);                           \
  auto d = get<3>(p);

#define FOR(i, n)     for(lli i = 0; i < (lli)(n); ++i)
#define FORU(i, j, k) for(lli i = (j); i <= (lli)(k); ++i)
#define FORD(i, j, k) for(lli i = (j); i >= (lli)(k); --i)

#define SQ(x) ((x)*(x))

#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back

using namespace std;

template<typename... As>
struct tpl : public std::tuple<As...> {
  using std::tuple<As...>::tuple;
  tpl(){}
  tpl(std::tuple<As...> const& b) { std::tuple<As...>::operator=(b); }

  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type const&
  x() const { return get<0>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type&
  x() { return get<0>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type const&
  y() const { return get<1>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type&
  y() { return get<1>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type const&
  z() const { return get<2>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type&
  z() { return get<2>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type const&
  w() const { return get<3>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type&
  w() { return get<3>(*this); }
};

using lli   = long long int;
using llu   = long long unsigned;

using pii   = tpl<lli, lli>;
using piii  = tpl<lli, lli, lli>;
using piiii = tpl<lli, lli, lli, lli>;
using vi    = vector<lli>;
using vii   = vector<pii>;
using viii  = vector<piii>;
using vvi   = vector<vi>;
using vvii  = vector<vii>;
using vviii = vector<viii>;

template<class T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
template<class T>
using max_queue = priority_queue<T>;

template<size_t... I>
struct my_index_sequence {
  using type = my_index_sequence;
  static constexpr array<size_t, sizeof...(I)> value = { {I...} };
};

namespace my_index_sequence_detail {
  template<typename I, typename J> struct concat;
  template<size_t... I, size_t... J>
  struct concat<my_index_sequence<I...>, my_index_sequence<J...> > :
    my_index_sequence<I..., (sizeof...(I)+J)...> { };
  template<size_t N> struct make_index_sequence :
    concat<typename make_index_sequence<N/2>::type, typename make_index_sequence<N-N/2>::type>::type { };
  template <> struct make_index_sequence<0> : my_index_sequence<>{};
  template <> struct make_index_sequence<1> : my_index_sequence<0>{};
}

template<class... A>
using my_index_sequence_for = typename my_index_sequence_detail::make_index_sequence<sizeof...(A)>::type;

template<class T, size_t... I>
void print_tuple(ostream& s, T const& a, my_index_sequence<I...>){
  using swallow = int[];
  (void)swallow{0, (void(s << (I == 0? "" : ", ") << get<I>(a)), 0)...};
}

template<class T>
ostream& print_collection(ostream& s, T const& a);
template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a);
template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a);
template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a);

template<class T, size_t I>
ostream& operator<<(ostream& s, array<T, I> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, vector<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, multimap<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, multiset<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, map<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, set<T> const& a) { return print_collection(s, a); }

template<class T>
ostream& print_collection(ostream& s, T const& a){
  s << '[';
  for(auto it = begin(a); it != end(a); ++it){
    s << *it;
    if(it != prev(end(a))) s << " ";
  }
  return s << ']';
}

template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a){
  return s << "(" << get<0>(a) << ", " << get<1>(a) << ")";
}

//------------------------------------------------------------------------------

void readii(pii& p) { cin>>p.x()>>p.y(); }

using rational = long double;
const rational EPS = 1e-11;

// struct rational {
//   rational() : x(0),y(1){ }
//   rational(lli a) : x(a), y(1){}
//   rational(lli a, lli b) {
//     lli g = __gcd(a,b);
//     a/=g; b/=g;
//     if(b<0) { a*=-1; b*=-1; }
//     x=a; y=b;
//   }
//   rational operator+(rational const& b) const {
//     return rational(x*b.y+y*b.x,y*b.y);
//   }
//   rational operator-(rational const& b) const {
//     return rational(x*b.y-y*b.x,y*b.y);
//   }
//   rational operator*(rational const& b) const {
//     return rational(x*b.x,y*b.y);
//   }
//   rational operator/(rational const& b) const {
//     return rational(x*b.y,y*b.x);
//   }
//   bool operator<(rational const& o) const {
//     return x*o.y<o.x*y;
//   }
//   bool operator<=(rational const& o) const {
//     return x*o.y<=o.x*y;
//   }

//   long double dbl() const { return (long double)x/(long double)y; }
//   lli x,y;
// };
// const rational EPS(0,1);

// ostream& operator<<(ostream& s, rational const& r) {
//   return s << r.x << "/" << r.y;
// }

// --- BEGIN SNIPPET TREAP ---

// struct treap;
// using treap_ptr = treap*;

// struct treap {
//   treap(rational x_, lli y_) : l(0), r(0), heap(rand()), x(x_), y(y_), sum(y) { }
//   treap_ptr l, r;
//   lli heap;

//   rational x;
//   lli y,sum;

//   static lli get_sum(treap_ptr a){ return a?a->sum:0; }

//   static void update(treap_ptr a){
//     if(a){
//       a->sum = a->y;
//       if(a->l) a->sum += a->l->sum;
//       if(a->r) a->sum += a->r->sum;
//     }
//   }

//   static void push(treap_ptr){ }

//   static treap_ptr merge(treap_ptr a, treap_ptr b){
//     if(a == 0) return b;
//     if(b == 0) return a;
//     push(a); push(b);
//     if(a->heap < b->heap){
//       a->r = merge(a->r, b);
//       update(a);
//       return a;
//     }else{
//       b->l = merge(a, b->l);
//       update(b);
//       return b;
//     }
//   }

//   static tpl<treap_ptr, treap_ptr> split_key(treap_ptr a, rational x){
//     if(a == 0) return mt(nullptr, nullptr);
//     push(a);
//     if(x <= a->x){
//       auto p = split_key(a->l, x);
//       a->l = p.y();
//       update(a);
//       return mt(p.x(), a);
//     }else{
//       auto p = split_key(a->r, x);
//       a->r = p.x();
//       update(a);
//       return mt(a, p.y());
//     }
//   }

//   // static tpl<treap_ptr, treap_ptr> split_pos(treap_ptr a, lli i){
//   //   if(a == 0) return mt(nullptr, nullptr);
//   //   push(a);
//   //   if(i <= get_size(a->l)){
//   //     auto p = split_pos(a->l, i);
//   //     a->l = p.y();
//   //     update(a);
//   //     return mt(p.x(), a);
//   //   }else{
//   //     auto p = split_pos(a->r, i - get_size(a->l) - 1);
//   //     a->r = p.x();
//   //     update(a);
//   //     return mt(a, p.y());
//   //   }
//   // }

//   static treap_ptr insert_key(treap_ptr a, rational x, lli y){
//     auto p = split_key(a, x);
//     return merge(merge(p.x(), new treap(x,y)), p.y());
//   }

//   // static treap_ptr insert_pos(treap_ptr a, lli i, rational x, lli y){
//   //   auto p = split_pos(a, i);
//   //   return merge(merge(p.x(), new treap(x,y)), p.y());
//   // }
// };

// --- END SNIPPET TREAP ---

// --- BEGIN SNIPPET BINARY INDEXED TREE ---

struct BIT {
  vi A;
  BIT(lli n) : A(n+1){ }

  lli get(lli i){
    if(i<0) return 0;
    i += 1;
    lli r = 0;
    for(; i > 0; i -= i &-i){
      r += A[i];
    }
    return r;
  }

  lli getR(lli l, lli r) {
    lli ans = get(r);
    if(l) ans -= get(l-1);
    return ans;
  }

  void add(lli i, lli v){
    if(i<0) return;
    i += 1;
    for(; i < (lli)A.size(); i += i & -i){
      A[i] += v;
    }
  }
};

// --- END SNIPPET BINARY INDEXED TREE ---

const int N = 100000;
pii F[N];
lli A[N];
pii Q[N];
lli T[N];
lli ANS[N];

template<class T>
tpl<T,T> operator+(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()+b.x(),a.y()+b.y());
}

template<class T>
tpl<T,T> operator-(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()-b.x(),a.y()-b.y());
}

template<class T>
T dot(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.x()+a.y()*b.y();
}

template<class T>
T det(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.y()-a.y()*b.x();
}

lli ata[2][N];
lli atb[2][N];

int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  lli k,n,q; cin>>k>>n>>q;
  vector<tpl<rational,rational>> P;
  { vector<tpl<rational,rational>> P2;
    FOR(i,k) {
      lli x,y;
#ifdef LOCAL
      x=rand()%1000; y=rand()%1000;
#else
      cin>>x>>y;
#endif
      P2.pb(tpl<rational,rational>(2*x,2*y));
      P2.pb(tpl<rational,rational>(-2*x,-2*y));
    }
    // sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y().dbl(),a.x().dbl())<atan2(b.y().dbl(),b.x().dbl()); });
    sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y(),a.x())<atan2(b.y(),b.x()); });
    P.pb(mt(0,0));
    FOR(i,2*k-1) P.pb(P.back() + P2[i]);
    tpl<rational,rational> center;
    FOR(i,2*k) center = center + P[i];
    center.x() = center.x()/rational(P.size()); center.y() = center.y()/rational(P.size());
    FOR(i,2*k) P[i] = P[i] - center;
  }
  //
  map<pii,lli> XX;
  FOR(i,n) {
#ifdef LOCAL
    F[i] = mt(rand()%1000000,rand()%1000000); A[i] = 1+rand()%100;
#else
    readii(F[i]); cin>>A[i];
#endif
    XX[F[i]]+=A[i];
  }
  FOR(i,q) {
#ifdef LOCAL
    Q[i] = mt(rand()%1000000,rand()%1000000); T[i] = 1+rand()%5;
#else
    readii(Q[i]); cin>>T[i];
#endif
    ANS[i] += XX[Q[i]];
  }
  //
  FOR(k_,2*k) {
    auto p0 = P[k_], p1 = P[(k_+1)%(2*k)];
    auto dt = det(p0,p1);
    vector<tpl<rational,rational,rational,lli,lli>> pts;
    vector<tpl<rational,rational,rational,lli>> qs;
    vector<tpl<rational,rational,lli,lli>> pts2;
    vector<tpl<rational,rational,lli>> qs2;
    vector<tpl<rational,lli,lli> > as,bs;
    FOR(i,n) {
      rational a = (p1.y() * F[i].x() - p1.x() * F[i].y()) / dt;
      rational b = (p0.x() * F[i].y() - p0.y() * F[i].x()) / dt;
      as.pb(mt(a,0,i)); bs.pb(mt(b,1,i));
      pts.pb(mt(a+b,a,b,i,A[i]));
      pts2.pb(mt(a,b,i,A[i]));
    }
    FOR(i,q) {
      rational a = (p1.y() * Q[i].x() - p1.x() * Q[i].y()) / dt;
      rational b = (p0.x() * Q[i].y() - p0.y() * Q[i].x()) / dt;
      as.pb(mt(a,1,i)); bs.pb(mt(b,0,i));
      qs.pb(mt(a+b+T[i],a,b,i));
      qs2.pb(mt(a,b,i));
    }
    sort(all(as)); sort(all(bs));
    FOR(i,as.size()) ata[as[i].y()][as[i].z()]=i;
    FOR(i,bs.size()) atb[bs[i].y()][bs[i].z()]=i;
    // unordered_map<double,int> ias,ibs;
    // ias.reserve(as.size());
    // ibs.reserve(bs.size());
    // FOR(i,as.size()) ias[as[i]]=i;
    // FOR(i,bs.size()) ibs[bs[i]]=i;

    // Sweep 1
    sort(all(pts)); sort(all(qs));
    lli pts_i = 0;
    lli allV = 0;
    BIT ta(as.size()+1), tb(bs.size()+1);
    for(auto const& ev : qs) {
      rational ab,a,b; lli i; tie(ab,a,b,i) = ev;
      while(pts_i<(lli)pts.size() && pts[pts_i].x() <= ab+EPS) {
        rational a,b; lli j,x; tie(ignore,a,b,j,x) = pts[pts_i];
        ta.add(ata[0][j],x);
        tb.add(atb[1][j],x);
        allV += x;
        pts_i++;
      }
      ANS[i] += allV;
      ANS[i] -= ta.get(ata[1][i]);
      ANS[i] -= tb.get(atb[0][i]);
    }
    // Sweep 2
    sort(all(pts2)); sort(all(qs2));
    pts_i = 0;
    BIT ts(bs.size()+1);
    for(auto const& ev : qs2) {
      rational a,b; lli i; tie(a,b,i) = ev;
      while(pts_i<(lli)pts2.size() && pts2[pts_i].x() <= a+EPS) {
        rational b; lli j,x; tie(ignore,b,j,x) = pts2[pts_i];
        ts.add(atb[1][j],x);
        pts_i++;
      }
      ANS[i] += ts.get(atb[0][i]);
    }
  }
  //
  FOR(i,q) cout << ANS[i] << '\n';
  cout << flush;
  return 0;
}


#ifndef __clang__
#pragma GCC optimize "-O3"
#pragma GCC target "tune=native"
#endif
#ifdef ONLINE_JUDGE
#define NDEBUG 1
#endif
#include <stdio.h>
#include <bits/stdc++.h>

#define DESTRUCT2(p, a, b)                      \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);

#define DESTRUCT3(p, a, b, c)                   \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);

#define DESTRUCT4(p, a, b, c, d)                \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);                           \
  auto d = get<3>(p);

#define FOR(i, n)     for(lli i = 0; i < (lli)(n); ++i)
#define FORU(i, j, k) for(lli i = (j); i <= (lli)(k); ++i)
#define FORD(i, j, k) for(lli i = (j); i >= (lli)(k); --i)

#define SQ(x) ((x)*(x))

#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back

using namespace std;

template<typename... As>
struct tpl : public std::tuple<As...> {
  using std::tuple<As...>::tuple;
  tpl(){}
  tpl(std::tuple<As...> const& b) { std::tuple<As...>::operator=(b); }

  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type const&
  x() const { return get<0>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type&
  x() { return get<0>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type const&
  y() const { return get<1>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type&
  y() { return get<1>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type const&
  z() const { return get<2>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type&
  z() { return get<2>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type const&
  w() const { return get<3>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type&
  w() { return get<3>(*this); }
};

using lli   = long long int;
using llu   = long long unsigned;

using pii   = tpl<lli, lli>;
using piii  = tpl<lli, lli, lli>;
using piiii = tpl<lli, lli, lli, lli>;
using vi    = vector<lli>;
using vii   = vector<pii>;
using viii  = vector<piii>;
using vvi   = vector<vi>;
using vvii  = vector<vii>;
using vviii = vector<viii>;

template<class T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
template<class T>
using max_queue = priority_queue<T>;

template<size_t... I>
struct my_index_sequence {
  using type = my_index_sequence;
  static constexpr array<size_t, sizeof...(I)> value = { {I...} };
};

namespace my_index_sequence_detail {
  template<typename I, typename J> struct concat;
  template<size_t... I, size_t... J>
  struct concat<my_index_sequence<I...>, my_index_sequence<J...> > :
    my_index_sequence<I..., (sizeof...(I)+J)...> { };
  template<size_t N> struct make_index_sequence :
    concat<typename make_index_sequence<N/2>::type, typename make_index_sequence<N-N/2>::type>::type { };
  template <> struct make_index_sequence<0> : my_index_sequence<>{};
  template <> struct make_index_sequence<1> : my_index_sequence<0>{};
}

template<class... A>
using my_index_sequence_for = typename my_index_sequence_detail::make_index_sequence<sizeof...(A)>::type;

template<class T, size_t... I>
void print_tuple(ostream& s, T const& a, my_index_sequence<I...>){
  using swallow = int[];
  (void)swallow{0, (void(s << (I == 0? "" : ", ") << get<I>(a)), 0)...};
}

template<class T>
ostream& print_collection(ostream& s, T const& a);
template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a);
template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a);
template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a);

template<class T, size_t I>
ostream& operator<<(ostream& s, array<T, I> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, vector<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, multimap<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, multiset<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, map<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, set<T> const& a) { return print_collection(s, a); }

template<class T>
ostream& print_collection(ostream& s, T const& a){
  s << '[';
  for(auto it = begin(a); it != end(a); ++it){
    s << *it;
    if(it != prev(end(a))) s << " ";
  }
  return s << ']';
}

template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a){
  return s << "(" << get<0>(a) << ", " << get<1>(a) << ")";
}

//------------------------------------------------------------------------------

void readii(pii& p) { cin>>p.x()>>p.y(); }

using rational = long double;
const rational EPS = 1e-9;

// struct rational {
//   rational() : x(0),y(1){ }
//   rational(lli a) : x(a), y(1){}
//   rational(lli a, lli b) {
//     lli g = __gcd(a,b);
//     a/=g; b/=g;
//     if(b<0) { a*=-1; b*=-1; }
//     x=a; y=b;
//   }
//   rational operator+(rational const& b) const {
//     return rational(x*b.y+y*b.x,y*b.y);
//   }
//   rational operator-(rational const& b) const {
//     return rational(x*b.y-y*b.x,y*b.y);
//   }
//   rational operator*(rational const& b) const {
//     return rational(x*b.x,y*b.y);
//   }
//   rational operator/(rational const& b) const {
//     return rational(x*b.y,y*b.x);
//   }
//   bool operator<(rational const& o) const {
//     return x*o.y<o.x*y;
//   }
//   bool operator<=(rational const& o) const {
//     return x*o.y<=o.x*y;
//   }

//   long double dbl() const { return (long double)x/(long double)y; }
//   lli x,y;
// };
// const rational EPS(0,1);

// ostream& operator<<(ostream& s, rational const& r) {
//   return s << r.x << "/" << r.y;
// }

// --- BEGIN SNIPPET TREAP ---

// struct treap;
// using treap_ptr = treap*;

// struct treap {
//   treap(rational x_, lli y_) : l(0), r(0), heap(rand()), x(x_), y(y_), sum(y) { }
//   treap_ptr l, r;
//   lli heap;

//   rational x;
//   lli y,sum;

//   static lli get_sum(treap_ptr a){ return a?a->sum:0; }

//   static void update(treap_ptr a){
//     if(a){
//       a->sum = a->y;
//       if(a->l) a->sum += a->l->sum;
//       if(a->r) a->sum += a->r->sum;
//     }
//   }

//   static void push(treap_ptr){ }

//   static treap_ptr merge(treap_ptr a, treap_ptr b){
//     if(a == 0) return b;
//     if(b == 0) return a;
//     push(a); push(b);
//     if(a->heap < b->heap){
//       a->r = merge(a->r, b);
//       update(a);
//       return a;
//     }else{
//       b->l = merge(a, b->l);
//       update(b);
//       return b;
//     }
//   }

//   static tpl<treap_ptr, treap_ptr> split_key(treap_ptr a, rational x){
//     if(a == 0) return mt(nullptr, nullptr);
//     push(a);
//     if(x <= a->x){
//       auto p = split_key(a->l, x);
//       a->l = p.y();
//       update(a);
//       return mt(p.x(), a);
//     }else{
//       auto p = split_key(a->r, x);
//       a->r = p.x();
//       update(a);
//       return mt(a, p.y());
//     }
//   }

//   // static tpl<treap_ptr, treap_ptr> split_pos(treap_ptr a, lli i){
//   //   if(a == 0) return mt(nullptr, nullptr);
//   //   push(a);
//   //   if(i <= get_size(a->l)){
//   //     auto p = split_pos(a->l, i);
//   //     a->l = p.y();
//   //     update(a);
//   //     return mt(p.x(), a);
//   //   }else{
//   //     auto p = split_pos(a->r, i - get_size(a->l) - 1);
//   //     a->r = p.x();
//   //     update(a);
//   //     return mt(a, p.y());
//   //   }
//   // }

//   static treap_ptr insert_key(treap_ptr a, rational x, lli y){
//     auto p = split_key(a, x);
//     return merge(merge(p.x(), new treap(x,y)), p.y());
//   }

//   // static treap_ptr insert_pos(treap_ptr a, lli i, rational x, lli y){
//   //   auto p = split_pos(a, i);
//   //   return merge(merge(p.x(), new treap(x,y)), p.y());
//   // }
// };

// --- END SNIPPET TREAP ---

// --- BEGIN SNIPPET BINARY INDEXED TREE ---

struct BIT {
  vi A;
  BIT(lli n) : A(n+1){ }

  lli get(lli i){
    if(i<0) return 0;
    i += 1;
    lli r = 0;
    for(; i > 0; i -= i &-i){
      r += A[i];
    }
    return r;
  }

  lli getR(lli l, lli r) {
    lli ans = get(r);
    if(l) ans -= get(l-1);
    return ans;
  }

  void add(lli i, lli v){
    if(i<0) return;
    i += 1;
    for(; i < (lli)A.size(); i += i & -i){
      A[i] += v;
    }
  }
};

// --- END SNIPPET BINARY INDEXED TREE ---

const int N = 100000;
pii F[N];
lli A[N];
pii Q[N];
lli T[N];
lli ANS[N];

template<class T>
tpl<T,T> operator+(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()+b.x(),a.y()+b.y());
}

template<class T>
tpl<T,T> operator-(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()-b.x(),a.y()-b.y());
}

template<class T>
T dot(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.x()+a.y()*b.y();
}

template<class T>
T det(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.y()-a.y()*b.x();
}

lli ata[2][N];
lli atb[2][N];

int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  lli k,n,q; cin>>k>>n>>q;
  vector<tpl<rational,rational>> P;
  { vector<tpl<rational,rational>> P2;
    FOR(i,k) {
      lli x,y;
#ifdef LOCAL
      x=rand()%1000; y=rand()%1000;
#else
      cin>>x>>y;
#endif
      P2.pb(tpl<rational,rational>(2*x,2*y));
      P2.pb(tpl<rational,rational>(-2*x,-2*y));
    }
    // sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y().dbl(),a.x().dbl())<atan2(b.y().dbl(),b.x().dbl()); });
    sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y(),a.x())<atan2(b.y(),b.x()); });
    P.pb(mt(0,0));
    FOR(i,2*k-1) P.pb(P.back() + P2[i]);
    tpl<rational,rational> center;
    FOR(i,2*k) center = center + P[i];
    center.x() = center.x()/rational(P.size()); center.y() = center.y()/rational(P.size());
    FOR(i,2*k) P[i] = P[i] - center;
  }
  //
  FOR(i,n) {
#ifdef LOCAL
    F[i] = mt(rand()%1000000,rand()%1000000); A[i] = 1+rand()%100;
#else
    readii(F[i]); cin>>A[i];
#endif
  }
  FOR(i,q) {
#ifdef LOCAL
    Q[i] = mt(rand()%1000000,rand()%1000000); T[i] = 1+rand()%5;
#else
    readii(Q[i]); cin>>T[i];
#endif
  }
  //
  FOR(k_,2*k) {
    auto p0 = P[k_], p1 = P[(k_+1)%(2*k)];
    auto dt = det(p0,p1);
    vector<tpl<rational,rational,rational,lli,lli>> pts;
    vector<tpl<rational,rational,rational,lli>> qs;
    vector<tpl<rational,rational,lli,lli>> pts2;
    vector<tpl<rational,rational,lli>> qs2;
    vector<tpl<rational,lli,lli> > as,bs;
    FOR(i,n) {
      rational a = (p1.y() * F[i].x() - p1.x() * F[i].y()) / dt;
      rational b = (p0.x() * F[i].y() - p0.y() * F[i].x()) / dt;
      as.pb(mt(a,0,i)); bs.pb(mt(b,1,i));
      pts.pb(mt(a+b,a,b,i,A[i]));
      pts2.pb(mt(a,b,i,A[i]));
    }
    FOR(i,q) {
      rational a = (p1.y() * Q[i].x() - p1.x() * Q[i].y()) / dt;
      rational b = (p0.x() * Q[i].y() - p0.y() * Q[i].x()) / dt;
      as.pb(mt(a,1,i)); bs.pb(mt(b,0,i));
      qs.pb(mt(a+b+T[i],a,b,i));
      qs2.pb(mt(a,b,i));
    }
    sort(all(as)); sort(all(bs));
    FOR(i,as.size()) ata[as[i].y()][as[i].z()]=i;
    FOR(i,bs.size()) atb[bs[i].y()][bs[i].z()]=i;
    // unordered_map<double,int> ias,ibs;
    // ias.reserve(as.size());
    // ibs.reserve(bs.size());
    // FOR(i,as.size()) ias[as[i]]=i;
    // FOR(i,bs.size()) ibs[bs[i]]=i;

    // Sweep 1
    sort(all(pts)); sort(all(qs));
    lli pts_i = 0;
    lli allV = 0;
    BIT ta(as.size()+1), tb(bs.size()+1);
    for(auto const& ev : qs) {
      rational ab,a,b; lli i; tie(ab,a,b,i) = ev;
      while(pts_i<(lli)pts.size() && pts[pts_i].x() <= ab+EPS) {
        rational a,b; lli j,x; tie(ignore,a,b,j,x) = pts[pts_i];
        ta.add(ata[0][j],x);
        tb.add(atb[1][j],x);
        allV += x;
        pts_i++;
      }
      ANS[i] += allV;
      ANS[i] -= ta.get(ata[1][i]);
      ANS[i] -= tb.get(atb[0][i]);
    }
    // Sweep 2
    sort(all(pts2)); sort(all(qs2));
    pts_i = 0;
    BIT ts(bs.size()+1);
    for(auto const& ev : qs2) {
      rational a,b; lli i; tie(a,b,i) = ev;
      while(pts_i<(lli)pts2.size() && pts2[pts_i].x() <= a+EPS) {
        rational b; lli j,x; tie(ignore,b,j,x) = pts2[pts_i];
        ts.add(atb[1][j],x);
        pts_i++;
      }
      ANS[i] += ts.get(atb[0][i]);
    }
  }
  //
  FOR(i,q) cout << ANS[i] << '\n';
  cout << flush;
  return 0;
}


#ifndef __clang__
#pragma GCC optimize "-O3"
#pragma GCC target "tune=native"
#endif
#ifdef ONLINE_JUDGE
#define NDEBUG 1
#endif
#include <stdio.h>
#include <bits/stdc++.h>

#define DESTRUCT2(p, a, b)                      \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);

#define DESTRUCT3(p, a, b, c)                   \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);

#define DESTRUCT4(p, a, b, c, d)                \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);                           \
  auto d = get<3>(p);

#define FOR(i, n)     for(lli i = 0; i < (lli)(n); ++i)
#define FORU(i, j, k) for(lli i = (j); i <= (lli)(k); ++i)
#define FORD(i, j, k) for(lli i = (j); i >= (lli)(k); --i)

#define SQ(x) ((x)*(x))

#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back

using namespace std;

template<typename... As>
struct tpl : public std::tuple<As...> {
  using std::tuple<As...>::tuple;
  tpl(){}
  tpl(std::tuple<As...> const& b) { std::tuple<As...>::operator=(b); }

  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type const&
  x() const { return get<0>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type&
  x() { return get<0>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type const&
  y() const { return get<1>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type&
  y() { return get<1>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type const&
  z() const { return get<2>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type&
  z() { return get<2>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type const&
  w() const { return get<3>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type&
  w() { return get<3>(*this); }
};

using lli   = long long int;
using llu   = long long unsigned;

using pii   = tpl<lli, lli>;
using piii  = tpl<lli, lli, lli>;
using piiii = tpl<lli, lli, lli, lli>;
using vi    = vector<lli>;
using vii   = vector<pii>;
using viii  = vector<piii>;
using vvi   = vector<vi>;
using vvii  = vector<vii>;
using vviii = vector<viii>;

template<class T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
template<class T>
using max_queue = priority_queue<T>;

template<size_t... I>
struct my_index_sequence {
  using type = my_index_sequence;
  static constexpr array<size_t, sizeof...(I)> value = { {I...} };
};

namespace my_index_sequence_detail {
  template<typename I, typename J> struct concat;
  template<size_t... I, size_t... J>
  struct concat<my_index_sequence<I...>, my_index_sequence<J...> > :
    my_index_sequence<I..., (sizeof...(I)+J)...> { };
  template<size_t N> struct make_index_sequence :
    concat<typename make_index_sequence<N/2>::type, typename make_index_sequence<N-N/2>::type>::type { };
  template <> struct make_index_sequence<0> : my_index_sequence<>{};
  template <> struct make_index_sequence<1> : my_index_sequence<0>{};
}

template<class... A>
using my_index_sequence_for = typename my_index_sequence_detail::make_index_sequence<sizeof...(A)>::type;

template<class T, size_t... I>
void print_tuple(ostream& s, T const& a, my_index_sequence<I...>){
  using swallow = int[];
  (void)swallow{0, (void(s << (I == 0? "" : ", ") << get<I>(a)), 0)...};
}

template<class T>
ostream& print_collection(ostream& s, T const& a);
template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a);
template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a);
template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a);

template<class T, size_t I>
ostream& operator<<(ostream& s, array<T, I> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, vector<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, multimap<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, multiset<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, map<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, set<T> const& a) { return print_collection(s, a); }

template<class T>
ostream& print_collection(ostream& s, T const& a){
  s << '[';
  for(auto it = begin(a); it != end(a); ++it){
    s << *it;
    if(it != prev(end(a))) s << " ";
  }
  return s << ']';
}

template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a){
  return s << "(" << get<0>(a) << ", " << get<1>(a) << ")";
}

//------------------------------------------------------------------------------

void readii(pii& p) { cin>>p.x()>>p.y(); }

using rational = double;
const rational EPS = 1e-9;

// struct rational {
//   rational() : x(0),y(1){ }
//   rational(lli a) : x(a), y(1){}
//   rational(lli a, lli b) {
//     lli g = __gcd(a,b);
//     a/=g; b/=g;
//     if(b<0) { a*=-1; b*=-1; }
//     x=a; y=b;
//   }
//   rational operator+(rational const& b) const {
//     return rational(x*b.y+y*b.x,y*b.y);
//   }
//   rational operator-(rational const& b) const {
//     return rational(x*b.y-y*b.x,y*b.y);
//   }
//   rational operator*(rational const& b) const {
//     return rational(x*b.x,y*b.y);
//   }
//   rational operator/(rational const& b) const {
//     return rational(x*b.y,y*b.x);
//   }
//   bool operator<(rational const& o) const {
//     return x*o.y<o.x*y;
//   }
//   bool operator<=(rational const& o) const {
//     return x*o.y<=o.x*y;
//   }

//   long double dbl() const { return (long double)x/(long double)y; }
//   lli x,y;
// };
// const rational EPS(0,1);

// ostream& operator<<(ostream& s, rational const& r) {
//   return s << r.x << "/" << r.y;
// }

struct BIT {
  vi A;
  BIT(lli n) : A(n+1){ }

  lli get(lli i){
    if(i<0) return 0;
    i += 1;
    lli r = 0;
    for(; i > 0; i -= i &-i){
      r += A[i];
    }
    return r;
  }

  lli getR(lli l, lli r) {
    lli ans = get(r);
    if(l) ans -= get(l-1);
    return ans;
  }

  void add(lli i, lli v){
    if(i<0) return;
    i += 1;
    for(; i < (lli)A.size(); i += i & -i){
      A[i] += v;
    }
  }
};

// --- END SNIPPET BINARY INDEXED TREE ---

const int N = 100000;
pii F[N];
lli A[N];
pii Q[N];
lli T[N];
lli ANS[N];

template<class T>
tpl<T,T> operator+(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()+b.x(),a.y()+b.y());
}

template<class T>
tpl<T,T> operator-(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()-b.x(),a.y()-b.y());
}

template<class T>
T dot(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.x()+a.y()*b.y();
}

template<class T>
T det(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.y()-a.y()*b.x();
}

lli ata[2][N];
lli atb[2][N];

int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  lli k,n,q; cin>>k>>n>>q;
  vector<tpl<rational,rational>> P;
  { vector<tpl<rational,rational>> P2;
    FOR(i,k) {
      lli x,y;
#ifdef LOCAL
      x=rand()%1000; y=rand()%1000;
#else
      cin>>x>>y;
#endif
      P2.pb(tpl<rational,rational>(2*x,2*y));
      P2.pb(tpl<rational,rational>(-2*x,-2*y));
    }
    // sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y().dbl(),a.x().dbl())<atan2(b.y().dbl(),b.x().dbl()); });
    sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y(),a.x())<atan2(b.y(),b.x()); });
    P.pb(mt(0,0));
    FOR(i,2*k-1) P.pb(P.back() + P2[i]);
    tpl<rational,rational> center;
    FOR(i,2*k) center = center + P[i];
    center.x() = center.x()/rational(P.size()); center.y() = center.y()/rational(P.size());
    FOR(i,2*k) P[i] = P[i] - center;
  }
  //
  map<pii,lli> XX;
  FOR(i,n) {
#ifdef LOCAL
    F[i] = mt(rand()%1000000,rand()%1000000); A[i] = 1+rand()%100;
#else
    readii(F[i]); cin>>A[i];
#endif
    XX[F[i]]+=A[i];
  }
  FOR(i,q) {
#ifdef LOCAL
    Q[i] = mt(rand()%1000000,rand()%1000000); T[i] = 1+rand()%5;
#else
    readii(Q[i]); cin>>T[i];
#endif
    ANS[i] += XX[Q[i]];
  }
  //
  FOR(k_,2*k) {
    auto p0 = P[k_], p1 = P[(k_+1)%(2*k)];
    auto dt = det(p0,p1);
    vector<tpl<rational,rational,rational,lli,lli>> pts;
    vector<tpl<rational,rational,rational,lli>> qs;
    vector<tpl<rational,rational,lli,lli>> pts2;
    vector<tpl<rational,rational,lli>> qs2;
    vector<tpl<rational,lli,lli> > as,bs;
    FOR(i,n) {
      rational a = (p1.y() * F[i].x() - p1.x() * F[i].y()) / dt;
      rational b = (p0.x() * F[i].y() - p0.y() * F[i].x()) / dt;
      as.pb(mt(a,0,i)); bs.pb(mt(b,1,i));
      pts.pb(mt(a+b,a,b,i,A[i]));
      pts2.pb(mt(a,b,i,A[i]));
    }
    FOR(i,q) {
      rational a = (p1.y() * Q[i].x() - p1.x() * Q[i].y()) / dt;
      rational b = (p0.x() * Q[i].y() - p0.y() * Q[i].x()) / dt;
      as.pb(mt(a,1,i)); bs.pb(mt(b,0,i));
      qs.pb(mt(a+b+T[i],a,b,i));
      qs2.pb(mt(a,b,i));
    }
    sort(all(as)); sort(all(bs));
    FOR(i,as.size()) ata[as[i].y()][as[i].z()]=i;
    FOR(i,bs.size()) atb[bs[i].y()][bs[i].z()]=i;

    // Sweep 1
    sort(all(pts)); sort(all(qs));
    lli pts_i = 0;
    lli allV = 0;
    BIT ta(as.size()+1), tb(bs.size()+1);
    for(auto const& ev : qs) {
      rational ab,a,b; lli i; tie(ab,a,b,i) = ev;
      while(pts_i<(lli)pts.size() && pts[pts_i].x() <= ab+EPS) {
        rational a,b; lli j,x; tie(ignore,a,b,j,x) = pts[pts_i];
        ta.add(ata[0][j],x);
        tb.add(atb[1][j],x);
        allV += x;
        pts_i++;
      }
      ANS[i] += allV;
      ANS[i] -= ta.get(ata[1][i]);
      ANS[i] -= tb.get(atb[0][i]);
    }
    // Sweep 2
    sort(all(pts2)); sort(all(qs2));
    pts_i = 0;
    BIT ts(bs.size()+1);
    for(auto const& ev : qs2) {
      rational a,b; lli i; tie(a,b,i) = ev;
      while(pts_i<(lli)pts2.size() && pts2[pts_i].x() <= a+EPS) {
        rational b; lli j,x; tie(ignore,b,j,x) = pts2[pts_i];
        ts.add(atb[1][j],x);
        pts_i++;
      }
      ANS[i] += ts.get(atb[0][i]);
    }
  }
  //
  FOR(i,q) cout << ANS[i] << '\n';
  cout << flush;
  exit(0);
  return 0;
}


#ifndef __clang__
#pragma GCC optimize "-O3"
#pragma GCC target "tune=native"
#endif
#ifdef ONLINE_JUDGE
#define NDEBUG 1
#endif
#include <stdio.h>
#include <bits/stdc++.h>

#define DESTRUCT2(p, a, b)                      \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);

#define DESTRUCT3(p, a, b, c)                   \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);

#define DESTRUCT4(p, a, b, c, d)                \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);                           \
  auto d = get<3>(p);

#define FOR(i, n)     for(lli i = 0; i < (lli)(n); ++i)
#define FORU(i, j, k) for(lli i = (j); i <= (lli)(k); ++i)
#define FORD(i, j, k) for(lli i = (j); i >= (lli)(k); --i)

#define SQ(x) ((x)*(x))

#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back

using namespace std;

template<typename... As>
struct tpl : public std::tuple<As...> {
  using std::tuple<As...>::tuple;
  tpl(){}
  tpl(std::tuple<As...> const& b) { std::tuple<As...>::operator=(b); }

  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type const&
  x() const { return get<0>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type&
  x() { return get<0>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type const&
  y() const { return get<1>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type&
  y() { return get<1>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type const&
  z() const { return get<2>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type&
  z() { return get<2>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type const&
  w() const { return get<3>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type&
  w() { return get<3>(*this); }
};

using lli   = long long int;
using llu   = long long unsigned;

using pii   = tpl<lli, lli>;
using piii  = tpl<lli, lli, lli>;
using piiii = tpl<lli, lli, lli, lli>;
using vi    = vector<lli>;
using vii   = vector<pii>;
using viii  = vector<piii>;
using vvi   = vector<vi>;
using vvii  = vector<vii>;
using vviii = vector<viii>;

template<class T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
template<class T>
using max_queue = priority_queue<T>;

template<size_t... I>
struct my_index_sequence {
  using type = my_index_sequence;
  static constexpr array<size_t, sizeof...(I)> value = { {I...} };
};

namespace my_index_sequence_detail {
  template<typename I, typename J> struct concat;
  template<size_t... I, size_t... J>
  struct concat<my_index_sequence<I...>, my_index_sequence<J...> > :
    my_index_sequence<I..., (sizeof...(I)+J)...> { };
  template<size_t N> struct make_index_sequence :
    concat<typename make_index_sequence<N/2>::type, typename make_index_sequence<N-N/2>::type>::type { };
  template <> struct make_index_sequence<0> : my_index_sequence<>{};
  template <> struct make_index_sequence<1> : my_index_sequence<0>{};
}

template<class... A>
using my_index_sequence_for = typename my_index_sequence_detail::make_index_sequence<sizeof...(A)>::type;

template<class T, size_t... I>
void print_tuple(ostream& s, T const& a, my_index_sequence<I...>){
  using swallow = int[];
  (void)swallow{0, (void(s << (I == 0? "" : ", ") << get<I>(a)), 0)...};
}

template<class T>
ostream& print_collection(ostream& s, T const& a);
template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a);
template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a);
template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a);

template<class T, size_t I>
ostream& operator<<(ostream& s, array<T, I> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, vector<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, multimap<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, multiset<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, map<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, set<T> const& a) { return print_collection(s, a); }

template<class T>
ostream& print_collection(ostream& s, T const& a){
  s << '[';
  for(auto it = begin(a); it != end(a); ++it){
    s << *it;
    if(it != prev(end(a))) s << " ";
  }
  return s << ']';
}

template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a){
  return s << "(" << get<0>(a) << ", " << get<1>(a) << ")";
}

//------------------------------------------------------------------------------

void readii(pii& p) { cin>>p.x()>>p.y(); }

// using rational = long double;
// const rational EPS = 1e-11;

struct rational {
  rational() : x(0),y(1){ }
  rational(lli a) : x(a), y(1){}
  rational(lli a, lli b) {
    lli g = __gcd(a,b);
    a/=g; b/=g;
    if(b<0) { a*=-1; b*=-1; }
    x=a; y=b;
  }
  rational operator+(rational const& b) const {
    return rational(x*b.y+y*b.x,y*b.y);
  }
  rational operator-(rational const& b) const {
    return rational(x*b.y-y*b.x,y*b.y);
  }
  rational operator*(rational const& b) const {
    return rational(x*b.x,y*b.y);
  }
  rational operator/(rational const& b) const {
    return rational(x*b.y,y*b.x);
  }
  bool operator<(rational const& o) const {
    return x*o.y<o.x*y;
  }
  bool operator<=(rational const& o) const {
    return x*o.y<=o.x*y;
  }

  long double dbl() const { return (long double)x/(long double)y; }
  lli x,y;
};
const rational EPS(0,1);

ostream& operator<<(ostream& s, rational const& r) {
  return s << r.x << "/" << r.y;
}

struct BIT {
  vi A;
  BIT(lli n) : A(n+1){ }

  lli get(lli i){
    if(i<0) return 0;
    i += 1;
    lli r = 0;
    for(; i > 0; i -= i &-i){
      r += A[i];
    }
    return r;
  }

  lli getR(lli l, lli r) {
    lli ans = get(r);
    if(l) ans -= get(l-1);
    return ans;
  }

  void add(lli i, lli v){
    if(i<0) return;
    i += 1;
    for(; i < (lli)A.size(); i += i & -i){
      A[i] += v;
    }
  }
};

// --- END SNIPPET BINARY INDEXED TREE ---

const int N = 100000;
pii F[N];
lli A[N];
pii Q[N];
lli T[N];
lli ANS[N];

template<class T>
tpl<T,T> operator+(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()+b.x(),a.y()+b.y());
}

template<class T>
tpl<T,T> operator-(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()-b.x(),a.y()-b.y());
}

template<class T>
T dot(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.x()+a.y()*b.y();
}

template<class T>
T det(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.y()-a.y()*b.x();
}

lli ata[2][N];
lli atb[2][N];

int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  lli k,n,q; cin>>k>>n>>q;
  vector<tpl<rational,rational>> P;
  { vector<tpl<rational,rational>> P2;
    FOR(i,k) {
      lli x,y;
#ifdef LOCAL
      x=rand()%1000; y=rand()%1000;
#else
      cin>>x>>y;
#endif
      P2.pb(tpl<rational,rational>(2*x,2*y));
      P2.pb(tpl<rational,rational>(-2*x,-2*y));
    }
     sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y().dbl(),a.x().dbl())<atan2(b.y().dbl(),b.x().dbl()); });
     // sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y(),a.x())<atan2(b.y(),b.x()); });
    P.pb(mt(0,0));
    FOR(i,2*k-1) P.pb(P.back() + P2[i]);
    tpl<rational,rational> center;
    FOR(i,2*k) center = center + P[i];
    center.x() = center.x()/rational(P.size()); center.y() = center.y()/rational(P.size());
    FOR(i,2*k) P[i] = P[i] - center;
  }
  //
  map<pii,lli> XX;
  FOR(i,n) {
#ifdef LOCAL
    F[i] = mt(rand()%1000000,rand()%1000000); A[i] = 1+rand()%100;
#else
    readii(F[i]); cin>>A[i];
#endif
    XX[F[i]]+=A[i];
  }
  FOR(i,q) {
#ifdef LOCAL
    Q[i] = mt(rand()%1000000,rand()%1000000); T[i] = 1+rand()%5;
#else
    readii(Q[i]); cin>>T[i];
#endif
    ANS[i] += XX[Q[i]];
  }
  //
  FOR(k_,2*k) {
    auto p0 = P[k_], p1 = P[(k_+1)%(2*k)];
    auto dt = det(p0,p1);
    vector<tpl<rational,rational,rational,lli,lli>> pts;
    vector<tpl<rational,rational,rational,lli>> qs;
    vector<tpl<rational,rational,lli,lli>> pts2;
    vector<tpl<rational,rational,lli>> qs2;
    vector<tpl<rational,lli,lli> > as,bs;
    FOR(i,n) {
      rational a = (p1.y() * F[i].x() - p1.x() * F[i].y()) / dt;
      rational b = (p0.x() * F[i].y() - p0.y() * F[i].x()) / dt;
      as.pb(mt(a,0,i)); bs.pb(mt(b,1,i));
      pts.pb(mt(a+b,a,b,i,A[i]));
      pts2.pb(mt(a,b,i,A[i]));
    }
    FOR(i,q) {
      rational a = (p1.y() * Q[i].x() - p1.x() * Q[i].y()) / dt;
      rational b = (p0.x() * Q[i].y() - p0.y() * Q[i].x()) / dt;
      as.pb(mt(a,1,i)); bs.pb(mt(b,0,i));
      qs.pb(mt(a+b+T[i],a,b,i));
      qs2.pb(mt(a,b,i));
    }
    sort(all(as)); sort(all(bs));
    FOR(i,as.size()) ata[as[i].y()][as[i].z()]=i;
    FOR(i,bs.size()) atb[bs[i].y()][bs[i].z()]=i;

    // Sweep 1
    sort(all(pts)); sort(all(qs));
    lli pts_i = 0;
    lli allV = 0;
    BIT ta(as.size()+1), tb(bs.size()+1);
    for(auto const& ev : qs) {
      rational ab,a,b; lli i; tie(ab,a,b,i) = ev;
      while(pts_i<(lli)pts.size() && pts[pts_i].x() <= ab+EPS) {
        rational a,b; lli j,x; tie(ignore,a,b,j,x) = pts[pts_i];
        ta.add(ata[0][j],x);
        tb.add(atb[1][j],x);
        allV += x;
        pts_i++;
      }
      ANS[i] += allV;
      ANS[i] -= ta.get(ata[1][i]);
      ANS[i] -= tb.get(atb[0][i]);
    }
    // Sweep 2
    sort(all(pts2)); sort(all(qs2));
    pts_i = 0;
    BIT ts(bs.size()+1);
    for(auto const& ev : qs2) {
      rational a,b; lli i; tie(a,b,i) = ev;
      while(pts_i<(lli)pts2.size() && pts2[pts_i].x() <= a+EPS) {
        rational b; lli j,x; tie(ignore,b,j,x) = pts2[pts_i];
        ts.add(atb[1][j],x);
        pts_i++;
      }
      ANS[i] += ts.get(atb[0][i]);
    }
  }
  //
  FOR(i,q) cout << ANS[i] << '\n';
  cout << flush;
  return 0;
}


#ifndef __clang__
#pragma GCC optimize "-O3"
#pragma GCC target "tune=native"
#endif
#ifdef ONLINE_JUDGE
#define NDEBUG 1
#endif
#include <stdio.h>
#include <bits/stdc++.h>

#define DESTRUCT2(p, a, b)                      \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);

#define DESTRUCT3(p, a, b, c)                   \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);

#define DESTRUCT4(p, a, b, c, d)                \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);                           \
  auto d = get<3>(p);

#define FOR(i, n)     for(lli i = 0; i < (lli)(n); ++i)
#define FORU(i, j, k) for(lli i = (j); i <= (lli)(k); ++i)
#define FORD(i, j, k) for(lli i = (j); i >= (lli)(k); --i)

#define SQ(x) ((x)*(x))

#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back

using namespace std;

template<typename... As>
struct tpl : public std::tuple<As...> {
  using std::tuple<As...>::tuple;
  tpl(){}
  tpl(std::tuple<As...> const& b) { std::tuple<As...>::operator=(b); }

  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type const&
  x() const { return get<0>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type&
  x() { return get<0>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type const&
  y() const { return get<1>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type&
  y() { return get<1>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type const&
  z() const { return get<2>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type&
  z() { return get<2>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type const&
  w() const { return get<3>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type&
  w() { return get<3>(*this); }
};

using lli   = long long int;
using llu   = long long unsigned;

using pii   = tpl<lli, lli>;
using piii  = tpl<lli, lli, lli>;
using piiii = tpl<lli, lli, lli, lli>;
using vi    = vector<lli>;
using vii   = vector<pii>;
using viii  = vector<piii>;
using vvi   = vector<vi>;
using vvii  = vector<vii>;
using vviii = vector<viii>;

template<class T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
template<class T>
using max_queue = priority_queue<T>;

template<size_t... I>
struct my_index_sequence {
  using type = my_index_sequence;
  static constexpr array<size_t, sizeof...(I)> value = { {I...} };
};

namespace my_index_sequence_detail {
  template<typename I, typename J> struct concat;
  template<size_t... I, size_t... J>
  struct concat<my_index_sequence<I...>, my_index_sequence<J...> > :
    my_index_sequence<I..., (sizeof...(I)+J)...> { };
  template<size_t N> struct make_index_sequence :
    concat<typename make_index_sequence<N/2>::type, typename make_index_sequence<N-N/2>::type>::type { };
  template <> struct make_index_sequence<0> : my_index_sequence<>{};
  template <> struct make_index_sequence<1> : my_index_sequence<0>{};
}

template<class... A>
using my_index_sequence_for = typename my_index_sequence_detail::make_index_sequence<sizeof...(A)>::type;

template<class T, size_t... I>
void print_tuple(ostream& s, T const& a, my_index_sequence<I...>){
  using swallow = int[];
  (void)swallow{0, (void(s << (I == 0? "" : ", ") << get<I>(a)), 0)...};
}

template<class T>
ostream& print_collection(ostream& s, T const& a);
template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a);
template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a);
template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a);

template<class T, size_t I>
ostream& operator<<(ostream& s, array<T, I> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, vector<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, multimap<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, multiset<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, map<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, set<T> const& a) { return print_collection(s, a); }

template<class T>
ostream& print_collection(ostream& s, T const& a){
  s << '[';
  for(auto it = begin(a); it != end(a); ++it){
    s << *it;
    if(it != prev(end(a))) s << " ";
  }
  return s << ']';
}

template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a){
  return s << "(" << get<0>(a) << ", " << get<1>(a) << ")";
}

//------------------------------------------------------------------------------

void readii(pii& p) { cin>>p.x()>>p.y(); }

// using rational = long double;
// const rational EPS = 1e-11;

struct rational {
  rational() : x(0),y(1){ }
  rational(lli a) : x(a), y(1){}
  rational(lli a, lli b) {
    lli g = __gcd(a,b);
    a/=g; b/=g;
    if(b<0) { a*=-1; b*=-1; }
    x=a; y=b;
  }
  rational operator+(rational const& b) const {
    return rational(x*b.y+y*b.x,y*b.y);
  }
  rational operator-(rational const& b) const {
    return rational(x*b.y-y*b.x,y*b.y);
  }
  rational operator*(rational const& b) const {
    return rational(x*b.x,y*b.y);
  }
  rational operator/(rational const& b) const {
    return rational(x*b.y,y*b.x);
  }
  bool operator<(rational const& o) const {
    return x*o.y<o.x*y;
  }
  bool operator<=(rational const& o) const {
    return x*o.y<=o.x*y;
  }

  long double dbl() const { return (long double)x/(long double)y; }
  lli x,y;
};
const rational EPS(0,1);

ostream& operator<<(ostream& s, rational const& r) {
  return s << r.x << "/" << r.y;
}

struct BIT {
  vi A;
  BIT(lli n) : A(n+1){ }

  lli get(lli i){
    if(i<0) return 0;
    i += 1;
    lli r = 0;
    for(; i > 0; i -= i &-i){
      r += A[i];
    }
    return r;
  }

  lli getR(lli l, lli r) {
    lli ans = get(r);
    if(l) ans -= get(l-1);
    return ans;
  }

  void add(lli i, lli v){
    if(i<0) return;
    i += 1;
    for(; i < (lli)A.size(); i += i & -i){
      A[i] += v;
    }
  }
};

// --- END SNIPPET BINARY INDEXED TREE ---

const int N = 100000;
pii F[N];
lli A[N];
pii Q[N];
lli T[N];
lli ANS[N];

template<class T>
tpl<T,T> operator+(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()+b.x(),a.y()+b.y());
}

template<class T>
tpl<T,T> operator-(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()-b.x(),a.y()-b.y());
}

template<class T>
T dot(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.x()+a.y()*b.y();
}

template<class T>
T det(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.y()-a.y()*b.x();
}

lli ata[2][N];
lli atb[2][N];

int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  lli k,n,q; cin>>k>>n>>q;
  vector<tpl<rational,rational>> P;
  { vector<tpl<rational,rational>> P2;
    FOR(i,k) {
      lli x,y;
#ifdef LOCAL
      x=rand()%1000; y=rand()%1000;
#else
      cin>>x>>y;
#endif
      P2.pb(tpl<rational,rational>(2*x,2*y));
      P2.pb(tpl<rational,rational>(-2*x,-2*y));
    }
     sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y().dbl(),a.x().dbl())<atan2(b.y().dbl(),b.x().dbl()); });
     // sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y(),a.x())<atan2(b.y(),b.x()); });
    P.pb(mt(0,0));
    FOR(i,2*k-1) P.pb(P.back() + P2[i]);
    tpl<rational,rational> center;
    FOR(i,2*k) center = center + P[i];
    center.x() = center.x()/rational(P.size()); center.y() = center.y()/rational(P.size());
    FOR(i,2*k) P[i] = P[i] - center;
  }
  //
  map<pii,lli> XX;
  FOR(i,n) {
#ifdef LOCAL
    F[i] = mt(rand()%1000000,rand()%1000000); A[i] = 1+rand()%100;
#else
    readii(F[i]); cin>>A[i];
#endif
    XX[F[i]]+=A[i];
  }
  FOR(i,q) {
#ifdef LOCAL
    Q[i] = mt(rand()%1000000,rand()%1000000); T[i] = 1+rand()%5;
#else
    readii(Q[i]); cin>>T[i];
#endif
    ANS[i] += XX[Q[i]];
  }
  //
  FOR(k_,2*k) {
    auto p0 = P[k_], p1 = P[(k_+1)%(2*k)];
    auto dt = det(p0,p1);
    vector<tpl<rational,rational,rational,lli,lli>> pts;
    vector<tpl<rational,rational,rational,lli>> qs;
    vector<tpl<rational,rational,lli,lli>> pts2;
    vector<tpl<rational,rational,lli>> qs2;
    vector<tpl<rational,lli,lli> > as,bs;
    FOR(i,n) {
      rational a = (p1.y() * F[i].x() - p1.x() * F[i].y()) / dt;
      rational b = (p0.x() * F[i].y() - p0.y() * F[i].x()) / dt;
      as.pb(mt(a,0,i)); bs.pb(mt(b,1,i));
      pts.pb(mt(a+b,a,b,i,A[i]));
      pts2.pb(mt(a,b,i,A[i]));
    }
    FOR(i,q) {
      rational a = (p1.y() * Q[i].x() - p1.x() * Q[i].y()) / dt;
      rational b = (p0.x() * Q[i].y() - p0.y() * Q[i].x()) / dt;
      as.pb(mt(a,1,i)); bs.pb(mt(b,0,i));
      qs.pb(mt(a+b+T[i],a,b,i));
      qs2.pb(mt(a,b,i));
    }
    sort(all(as)); sort(all(bs));
    FOR(i,as.size()) ata[as[i].y()][as[i].z()]=i;
    FOR(i,bs.size()) atb[bs[i].y()][bs[i].z()]=i;

    // Sweep 1
    sort(all(pts)); sort(all(qs));
    lli pts_i = 0;
    lli allV = 0;
    BIT ta(as.size()+1), tb(bs.size()+1);
    for(auto const& ev : qs) {
      rational ab,a,b; lli i; tie(ab,a,b,i) = ev;
      while(pts_i<(lli)pts.size() && pts[pts_i].x() <= ab+EPS) {
        rational a,b; lli j,x; tie(ignore,a,b,j,x) = pts[pts_i];
        ta.add(ata[0][j],x);
        tb.add(atb[1][j],x);
        allV += x;
        pts_i++;
      }
      ANS[i] += allV;
      ANS[i] -= ta.get(ata[1][i]);
      ANS[i] -= tb.get(atb[0][i]);
    }
    // Sweep 2
    sort(all(pts2)); sort(all(qs2));
    pts_i = 0;
    BIT ts(bs.size()+1);
    for(auto const& ev : qs2) {
      rational a,b; lli i; tie(a,b,i) = ev;
      while(pts_i<(lli)pts2.size() && pts2[pts_i].x() <= a+EPS) {
        rational b; lli j,x; tie(ignore,b,j,x) = pts2[pts_i];
        ts.add(atb[1][j],x);
        pts_i++;
      }
      ANS[i] += ts.get(atb[0][i]);
    }
  }
  //
  FOR(i,q) cout << ANS[i] << '\n';
  cout << flush;
  exit(0);
  return 0;
}


#ifndef __clang__
#pragma GCC optimize "-O3"
#pragma GCC target "tune=native"
#endif
#ifdef ONLINE_JUDGE
#define NDEBUG 1
#endif
#include <stdio.h>
#include <bits/stdc++.h>

#define DESTRUCT2(p, a, b)                      \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);

#define DESTRUCT3(p, a, b, c)                   \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);

#define DESTRUCT4(p, a, b, c, d)                \
  auto a = get<0>(p);                           \
  auto b = get<1>(p);                           \
  auto c = get<2>(p);                           \
  auto d = get<3>(p);

#define FOR(i, n)     for(lli i = 0; i < (lli)(n); ++i)
#define FORU(i, j, k) for(lli i = (j); i <= (lli)(k); ++i)
#define FORD(i, j, k) for(lli i = (j); i >= (lli)(k); --i)

#define SQ(x) ((x)*(x))

#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back

using namespace std;

template<typename... As>
struct tpl : public std::tuple<As...> {
  using std::tuple<As...>::tuple;
  tpl(){}
  tpl(std::tuple<As...> const& b) { std::tuple<As...>::operator=(b); }

  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type const&
  x() const { return get<0>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<0, T>::type&
  x() { return get<0>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type const&
  y() const { return get<1>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<1, T>::type&
  y() { return get<1>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type const&
  z() const { return get<2>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<2, T>::type&
  z() { return get<2>(*this); }

  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type const&
  w() const { return get<3>(*this); }
  template<typename T = tuple<As...> >
  typename tuple_element<3, T>::type&
  w() { return get<3>(*this); }
};

using lli   = long long int;
using llu   = long long unsigned;

using pii   = tpl<lli, lli>;
using piii  = tpl<lli, lli, lli>;
using piiii = tpl<lli, lli, lli, lli>;
using vi    = vector<lli>;
using vii   = vector<pii>;
using viii  = vector<piii>;
using vvi   = vector<vi>;
using vvii  = vector<vii>;
using vviii = vector<viii>;

template<class T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
template<class T>
using max_queue = priority_queue<T>;

template<size_t... I>
struct my_index_sequence {
  using type = my_index_sequence;
  static constexpr array<size_t, sizeof...(I)> value = { {I...} };
};

namespace my_index_sequence_detail {
  template<typename I, typename J> struct concat;
  template<size_t... I, size_t... J>
  struct concat<my_index_sequence<I...>, my_index_sequence<J...> > :
    my_index_sequence<I..., (sizeof...(I)+J)...> { };
  template<size_t N> struct make_index_sequence :
    concat<typename make_index_sequence<N/2>::type, typename make_index_sequence<N-N/2>::type>::type { };
  template <> struct make_index_sequence<0> : my_index_sequence<>{};
  template <> struct make_index_sequence<1> : my_index_sequence<0>{};
}

template<class... A>
using my_index_sequence_for = typename my_index_sequence_detail::make_index_sequence<sizeof...(A)>::type;

template<class T, size_t... I>
void print_tuple(ostream& s, T const& a, my_index_sequence<I...>){
  using swallow = int[];
  (void)swallow{0, (void(s << (I == 0? "" : ", ") << get<I>(a)), 0)...};
}

template<class T>
ostream& print_collection(ostream& s, T const& a);
template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a);
template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a);
template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a);

template<class T, size_t I>
ostream& operator<<(ostream& s, array<T, I> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, vector<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, multimap<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, multiset<T> const& a) { return print_collection(s, a); }
template<class T, class U>
ostream& operator<<(ostream& s, map<T, U> const& a) { return print_collection(s, a); }
template<class T>
ostream& operator<<(ostream& s, set<T> const& a) { return print_collection(s, a); }

template<class T>
ostream& print_collection(ostream& s, T const& a){
  s << '[';
  for(auto it = begin(a); it != end(a); ++it){
    s << *it;
    if(it != prev(end(a))) s << " ";
  }
  return s << ']';
}

template<class... A>
ostream& operator<<(ostream& s, tpl<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class... A>
ostream& operator<<(ostream& s, tuple<A...> const& a){
  s << '(';
  print_tuple(s, a, my_index_sequence_for<A...>{});
  return s << ')';
}

template<class A, class B>
ostream& operator<<(ostream& s, pair<A, B> const& a){
  return s << "(" << get<0>(a) << ", " << get<1>(a) << ")";
}

//------------------------------------------------------------------------------

void readii(pii& p) { cin>>p.x()>>p.y(); }

using rational = long double;
const rational EPS = 1e-10;

// struct rational {
//   rational() : x(0),y(1){ }
//   rational(lli a) : x(a), y(1){}
//   rational(lli a, lli b) {
//     lli g = __gcd(a,b);
//     a/=g; b/=g;
//     if(b<0) { a*=-1; b*=-1; }
//     x=a; y=b;
//   }
//   rational operator+(rational const& b) const {
//     return rational(x*b.y+y*b.x,y*b.y);
//   }
//   rational operator-(rational const& b) const {
//     return rational(x*b.y-y*b.x,y*b.y);
//   }
//   rational operator*(rational const& b) const {
//     return rational(x*b.x,y*b.y);
//   }
//   rational operator/(rational const& b) const {
//     return rational(x*b.y,y*b.x);
//   }
//   bool operator<(rational const& o) const {
//     return x*o.y<o.x*y;
//   }
//   bool operator<=(rational const& o) const {
//     return x*o.y<=o.x*y;
//   }

//   long double dbl() const { return (long double)x/(long double)y; }
//   lli x,y;
// };
// const rational EPS(0,1);

// ostream& operator<<(ostream& s, rational const& r) {
//   return s << r.x << "/" << r.y;
// }

// --- BEGIN SNIPPET TREAP ---

// struct treap;
// using treap_ptr = treap*;

// struct treap {
//   treap(rational x_, lli y_) : l(0), r(0), heap(rand()), x(x_), y(y_), sum(y) { }
//   treap_ptr l, r;
//   lli heap;

//   rational x;
//   lli y,sum;

//   static lli get_sum(treap_ptr a){ return a?a->sum:0; }

//   static void update(treap_ptr a){
//     if(a){
//       a->sum = a->y;
//       if(a->l) a->sum += a->l->sum;
//       if(a->r) a->sum += a->r->sum;
//     }
//   }

//   static void push(treap_ptr){ }

//   static treap_ptr merge(treap_ptr a, treap_ptr b){
//     if(a == 0) return b;
//     if(b == 0) return a;
//     push(a); push(b);
//     if(a->heap < b->heap){
//       a->r = merge(a->r, b);
//       update(a);
//       return a;
//     }else{
//       b->l = merge(a, b->l);
//       update(b);
//       return b;
//     }
//   }

//   static tpl<treap_ptr, treap_ptr> split_key(treap_ptr a, rational x){
//     if(a == 0) return mt(nullptr, nullptr);
//     push(a);
//     if(x <= a->x){
//       auto p = split_key(a->l, x);
//       a->l = p.y();
//       update(a);
//       return mt(p.x(), a);
//     }else{
//       auto p = split_key(a->r, x);
//       a->r = p.x();
//       update(a);
//       return mt(a, p.y());
//     }
//   }

//   // static tpl<treap_ptr, treap_ptr> split_pos(treap_ptr a, lli i){
//   //   if(a == 0) return mt(nullptr, nullptr);
//   //   push(a);
//   //   if(i <= get_size(a->l)){
//   //     auto p = split_pos(a->l, i);
//   //     a->l = p.y();
//   //     update(a);
//   //     return mt(p.x(), a);
//   //   }else{
//   //     auto p = split_pos(a->r, i - get_size(a->l) - 1);
//   //     a->r = p.x();
//   //     update(a);
//   //     return mt(a, p.y());
//   //   }
//   // }

//   static treap_ptr insert_key(treap_ptr a, rational x, lli y){
//     auto p = split_key(a, x);
//     return merge(merge(p.x(), new treap(x,y)), p.y());
//   }

//   // static treap_ptr insert_pos(treap_ptr a, lli i, rational x, lli y){
//   //   auto p = split_pos(a, i);
//   //   return merge(merge(p.x(), new treap(x,y)), p.y());
//   // }
// };

// --- END SNIPPET TREAP ---

// --- BEGIN SNIPPET BINARY INDEXED TREE ---

struct BIT {
  vi A;
  BIT(lli n) : A(n+1){ }

  lli get(lli i){
    if(i<0) return 0;
    i += 1;
    lli r = 0;
    for(; i > 0; i -= i &-i){
      r += A[i];
    }
    return r;
  }

  lli getR(lli l, lli r) {
    lli ans = get(r);
    if(l) ans -= get(l-1);
    return ans;
  }

  void add(lli i, lli v){
    if(i<0) return;
    i += 1;
    for(; i < (lli)A.size(); i += i & -i){
      A[i] += v;
    }
  }
};

// --- END SNIPPET BINARY INDEXED TREE ---

const int N = 100000;
pii F[N];
lli A[N];
pii Q[N];
lli T[N];
lli ANS[N];

template<class T>
tpl<T,T> operator+(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()+b.x(),a.y()+b.y());
}

template<class T>
tpl<T,T> operator-(tpl<T,T> const& a, tpl<T,T> const& b) {
  return tpl<T,T>(a.x()-b.x(),a.y()-b.y());
}

template<class T>
T dot(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.x()+a.y()*b.y();
}

template<class T>
T det(tpl<T,T> const& a, tpl<T,T> const& b) {
  return a.x()*b.y()-a.y()*b.x();
}

lli ata[2][N];
lli atb[2][N];

int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  lli k,n,q; cin>>k>>n>>q;
  vector<tpl<rational,rational>> P;
  { vector<tpl<rational,rational>> P2;
    FOR(i,k) {
      lli x,y;
#ifdef LOCAL
      x=rand()%1000; y=rand()%1000;
#else
      cin>>x>>y;
#endif
      P2.pb(tpl<rational,rational>(2*x,2*y));
      P2.pb(tpl<rational,rational>(-2*x,-2*y));
    }
    // sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y().dbl(),a.x().dbl())<atan2(b.y().dbl(),b.x().dbl()); });
    sort(all(P2), [&](auto const& a, auto const& b) { return atan2(a.y(),a.x())<atan2(b.y(),b.x()); });
    P.pb(mt(0,0));
    FOR(i,2*k-1) P.pb(P.back() + P2[i]);
    tpl<rational,rational> center;
    FOR(i,2*k) center = center + P[i];
    center.x() = center.x()/rational(P.size()); center.y() = center.y()/rational(P.size());
    FOR(i,2*k) P[i] = P[i] - center;
  }
  //
  FOR(i,n) {
#ifdef LOCAL
    F[i] = mt(rand()%1000000,rand()%1000000); A[i] = 1+rand()%100;
#else
    readii(F[i]); cin>>A[i];
#endif
  }
  FOR(i,q) {
#ifdef LOCAL
    Q[i] = mt(rand()%1000000,rand()%1000000); T[i] = 1+rand()%5;
#else
    readii(Q[i]); cin>>T[i];
#endif
  }
  //
  FOR(k_,2*k) {
    auto p0 = P[k_], p1 = P[(k_+1)%(2*k)];
    auto dt = det(p0,p1);
    vector<tpl<rational,rational,rational,lli,lli>> pts;
    vector<tpl<rational,rational,rational,lli>> qs;
    vector<tpl<rational,rational,lli,lli>> pts2;
    vector<tpl<rational,rational,lli>> qs2;
    vector<tpl<rational,lli,lli> > as,bs;
    FOR(i,n) {
      rational a = (p1.y() * F[i].x() - p1.x() * F[i].y()) / dt;
      rational b = (p0.x() * F[i].y() - p0.y() * F[i].x()) / dt;
      as.pb(mt(a,0,i)); bs.pb(mt(b,1,i));
      pts.pb(mt(a+b,a,b,i,A[i]));
      pts2.pb(mt(a,b,i,A[i]));
    }
    FOR(i,q) {
      rational a = (p1.y() * Q[i].x() - p1.x() * Q[i].y()) / dt;
      rational b = (p0.x() * Q[i].y() - p0.y() * Q[i].x()) / dt;
      as.pb(mt(a,1,i)); bs.pb(mt(b,0,i));
      qs.pb(mt(a+b+T[i],a,b,i));
      qs2.pb(mt(a,b,i));
    }
    sort(all(as)); sort(all(bs));
    FOR(i,as.size()) ata[as[i].y()][as[i].z()]=i;
    FOR(i,bs.size()) atb[bs[i].y()][bs[i].z()]=i;
    // unordered_map<double,int> ias,ibs;
    // ias.reserve(as.size());
    // ibs.reserve(bs.size());
    // FOR(i,as.size()) ias[as[i]]=i;
    // FOR(i,bs.size()) ibs[bs[i]]=i;

    // Sweep 1
    sort(all(pts)); sort(all(qs));
    lli pts_i = 0;
    lli allV = 0;
    BIT ta(as.size()+1), tb(bs.size()+1);
    for(auto const& ev : qs) {
      rational ab,a,b; lli i; tie(ab,a,b,i) = ev;
      while(pts_i<(lli)pts.size() && pts[pts_i].x() <= ab+EPS) {
        rational a,b; lli j,x; tie(ignore,a,b,j,x) = pts[pts_i];
        ta.add(ata[0][j],x);
        tb.add(atb[1][j],x);
        allV += x;
        pts_i++;
      }
      ANS[i] += allV;
      ANS[i] -= ta.get(ata[1][i]);
      ANS[i] -= tb.get(atb[0][i]);
    }
    // Sweep 2
    sort(all(pts2)); sort(all(qs2));
    pts_i = 0;
    BIT ts(bs.size()+1);
    for(auto const& ev : qs2) {
      rational a,b; lli i; tie(a,b,i) = ev;
      while(pts_i<(lli)pts2.size() && pts2[pts_i].x() <= a+EPS) {
        rational b; lli j,x; tie(ignore,b,j,x) = pts2[pts_i];
        ts.add(atb[1][j],x);
        pts_i++;
      }
      ANS[i] += ts.get(atb[0][i]);
    }
  }
  //
  FOR(i,q) cout << ANS[i] << '\n';
  cout << flush;
  return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 100000
#define N 131072
#define INF 2000000000
#define eps 1e-11
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN+5];map<long long,long long> num;
int K,n,m,totx,toty,tot=0,fx[MN+5],fy[MN+5],A[MN+5];
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind;double x,y;int id,ad;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return INF;else return(double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

void Solve(vector<ques>&q,double k)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(k==INF) q.push_back((ques){1,fx[i],fy[i],A[i],0}),L[++cnt]=fy[i];
		else
		{
			double c=(double)fy[i]-k*fx[i];L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);cnt=unique(L+1,L+cnt+1)-L-1;
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=lower_bound(L+1,L+cnt+1,q[i].y)-L;
			Renew(p,q[i].id);
		}
		else
		{
			int p=upper_bound(L+1,L+cnt+1,q[i].y)-L-1;
			if(p) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[1LL*fx[i]*(1e9)+fy[i]]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read(),id;
		x-=t*totx;y-=t*toty;int top=0;Ans[i]+=num[1LL*x*(1e9)+y];
		for(int j=1,id=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j,id=(j-1)%m+1)
		if(!s[j].x)
		{
			if(s[j].y<0)
			{
				v[id].push_back((ques){0,x,y,i,1});
				v[id].push_back((ques){0,x,y+s[j].y*t,i,-1});
				v[id].push_back((ques){0,x-eps,y,i,-1});
				v[id].push_back((ques){0,x-eps,y+s[j].y*t,i,1});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x,c,i,1});
			v[id].push_back((ques){0,x+s[j].x*t,c,i,-1});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x+s[j].x*t,c-eps,i,-1});
			v[id].push_back((ques){0,x,c-eps,i,1});
		}
	}
	for(int i=1;i<=m;++i) Solve(v[i],GetSlop(s[i].y,s[i].x));
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 200000
#define N 262144
#define INF 2000000000
#define eps 1e-7
#define pa pair<int,int>
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN+5];map<pa,long long> num;
int K,n,m,totx=0,toty=0,fx[MN+5],fy[MN+5],A[MN+5];
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind,x;double y;int id,ad,t;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return INF;else return (double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

int Find(int r,double y)
{
	int l=1,res=r+1,mid;
	while(l<=r)
	{
		mid=l+r>>1;
		if(L[mid]>y) res=mid,r=mid-1;
		else l=mid+1;
	}
	return res-1;
}

void Solve(vector<ques> q,int ky,int kx)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(!kx) q.push_back((ques){1,fx[i],fy[i],A[i],0,0}),L[++cnt]=fy[i];
		else
		{
			double c=(double)fy[i]-(double)fx[i]*ky/kx;L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0,0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=lower_bound(L+1,L+cnt+1,q[i].y)-L;
			Renew(p,q[i].id);
		}
		else
		{
			int p=upper_bound(L+1,L+cnt+1,q[i].y)-L-1;
			while(p>0&&q[i].t&&q[i].y==L[p]) --p;
			if(p>0) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		if(s[i].x==0&&s[i].y<0) s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[make_pair(fx[i],fy[i])]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read(),id;
		x-=t*totx;y-=t*toty;Ans[i]+=num[make_pair(x,y)];
		for(int j=1,id=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j,id=(j-1)%(K>>1)+1)
		if(!s[j].x)
		{
			if(s[j].y<0)
			{
				v[id].push_back((ques){0,x,y,i,1,0});
				v[id].push_back((ques){0,x,y+s[j].y*t,i,-1,0});
				v[id].push_back((ques){0,x-1,y,i,-1,0});
				v[id].push_back((ques){0,x-1,y+s[j].y*t,i,1,0});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x,c,i,1,0});
			v[id].push_back((ques){0,x+s[j].x*t,c,i,-1,0});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x+s[j].x*t,c,i,-1,1});
			v[id].push_back((ques){0,x,c,i,1,1});
		}
	}
	for(int i=1;i<=K>>1;++i) Solve(v[i],s[i].y,s[i].x);
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 200000
#define N 262144
#define INF 2000000000
#define eps 1e-5
#define pa pair<int,int>
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN+5];map<pa,long long> num;
int K,n,m,totx=0,toty=0,fx[MN+5],fy[MN+5],A[MN+5];
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind,x;double y;int id,ad;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return INF;else return (double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

int Find(int r,double y)
{
	int l=1,res=r+1,mid;
	while(l<=r)
	{
		mid=l+r>>1;
		if(L[mid]>y) res=mid,r=mid-1;
		else l=mid+1;
	}
	return res-1;
}

void Solve(vector<ques> q,int ky,int kx)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(!kx) q.push_back((ques){1,fx[i],fy[i],A[i],0}),L[++cnt]=fy[i];
		else
		{
			double c=(double)fy[i]-(double)fx[i]*ky/kx;L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=Find(cnt,q[i].y);
			Renew(p,q[i].id);
		}
		else
		{
			int p=Find(cnt,q[i].y);
			if(p>0) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		if(s[i].x==0&&s[i].y<0) s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[make_pair(fx[i],fy[i])]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read(),id;
		x-=t*totx;y-=t*toty;Ans[i]+=num[make_pair(x,y)];
		for(int j=1,id=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j,id=(j-1)%(K>>1)+1)
		if(!s[j].x)
		{
			if(s[j].y<0)
			{
				v[id].push_back((ques){0,x,y,i,1});
				v[id].push_back((ques){0,x,y+s[j].y*t,i,-1});
				v[id].push_back((ques){0,x-1,y,i,-1});
				v[id].push_back((ques){0,x-1,y+s[j].y*t,i,1});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x,c,i,1});
			v[id].push_back((ques){0,x+s[j].x*t,c,i,-1});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x+s[j].x*t,c-3*eps,i,-1});
			v[id].push_back((ques){0,x,c-3*eps,i,1});
		}
	}
	for(int i=1;i<=K>>1;++i) Solve(v[i],s[i].y,s[i].x);
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 100000
#define N 131072
#define INF 2000000000
#define eps 1e-6
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN+5];map<long long,long long> num;
int K,n,m,totx,toty,tot=0,fx[MN+5],fy[MN+5],A[MN+5];
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind,x;double y;int id,ad;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return INF;else return (double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

void Solve(vector<ques> q,double k)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(k==INF) q.push_back((ques){1,fx[i],fy[i],A[i],0}),L[++cnt]=fy[i];
		else
		{
			double c=(double)fy[i]-k*fx[i];L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=lower_bound(L+1,L+cnt+1,q[i].y)-L;
			Renew(p,q[i].id);
		}
		else
		{
			int p=upper_bound(L+1,L+cnt+1,q[i].y)-L-1;
			if(p) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[1LL*fx[i]*(1e9)+fy[i]]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read(),id;
		x-=t*totx;y-=t*toty;Ans[i]+=num[1LL*x*(1e9)+y];
		for(int j=1,id=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j,id=(j-1)%(K>>1)+1)
		if(!s[j].x)
		{
			if(s[j].y<0)
			{
				v[id].push_back((ques){0,x,y,i,1});
				v[id].push_back((ques){0,x,y+s[j].y*t,i,-1});
				v[id].push_back((ques){0,x-1,y,i,-1});
				v[id].push_back((ques){0,x-1,y+s[j].y*t,i,1});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x,c,i,1});
			v[id].push_back((ques){0,x+s[j].x*t,c,i,-1});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x+s[j].x*t,c-eps,i,-1});
			v[id].push_back((ques){0,x,c-eps,i,1});
		}
	}
	for(int i=1;i<=K>>1;++i) Solve(v[i],GetSlop(s[i].y,s[i].x));
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 100000
#define N 131072
#define INF 2000000000
#define eps 1e-11
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN+5];map<long long,long long> num;
int K,n,m,totx,toty,tot=0,fx[MN+5],fy[MN+5],A[MN+5];
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind;double x,y;int id,ad;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return INF;else return(double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

void Solve(vector<ques>&q,double k)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(k==INF) q.push_back((ques){1,fx[i],fy[i],A[i],0}),L[++cnt]=fy[i];
		else
		{
			double c=(double)fy[i]-k*fx[i];L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);cnt=unique(L+1,L+cnt+1)-L-1;
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=lower_bound(L+1,L+cnt+1,q[i].y)-L;
			Renew(p,q[i].id);
		}
		else
		{
			int p=upper_bound(L+1,L+cnt+1,q[i].y)-L-1;
			if(p) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[1LL*fx[i]*(1e9)+fy[i]]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read(),id;
		x-=t*totx;y-=t*toty;int top=0;Ans[i]+=num[1LL*x*(1e9)+y];
		for(int j=1,id=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j,id=(j-1)%K+1)
		if(!s[j].x)
		{
			if(s[j].y<0)
			{
				v[id].push_back((ques){0,x,y,i,1});
				v[id].push_back((ques){0,x,y+s[j].y*t,i,-1});
				v[id].push_back((ques){0,x-eps,y,i,-1});
				v[id].push_back((ques){0,x-eps,y+s[j].y*t,i,1});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x,c,i,1});
			v[id].push_back((ques){0,x+s[j].x*t,c,i,-1});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x+s[j].x*t,c-eps,i,-1});
			v[id].push_back((ques){0,x,c-eps,i,1});
		}
	}
	for(int i=1;i<=K;++i) Solve(v[i],GetSlop(s[i].y,s[i].x));
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 100000
#define N 131072
#define INF 2000000000
#define eps 1e-8
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN*5+5];
map<double,int> mp;map<long long,long long> num;map<int,int> Mp;
int K,n,m,totx,toty,tot=0,fx[MN+5],fy[MN+5],A[MN+5],t[MN+5],cnt=0;
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind;double x,y;int id,ad;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return y>0?INF:-INF;else return(double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

void Solve(vector<ques>&q,double k)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(k==INF||k==-INF) q.push_back((ques){1,fx[i],fy[i],A[i],0}),L[++cnt]=fy[i];
		else
		{
			double c=fy[i]-k*fx[i];L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);cnt=unique(L+1,L+cnt+1)-L-1;
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=lower_bound(L+1,L+cnt+1,q[i].y)-L;
			Renew(p,q[i].id);
		}
		else
		{
			int p=upper_bound(L+1,L+cnt+1,q[i].y)-L-1;
			if(p) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=K;++i)
		if(!mp[GetSlop(s[i].y,s[i].x)]) mp[GetSlop(s[i].y,s[i].x)]=++tot;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[1LL*fx[i]*(1e9)+fy[i]]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read();
		x-=t*totx;y-=t*toty;int top=0;Ans[i]+=num[1LL*x*(1e9)+y]+num[1LL*(x+totx*2)*(1e9)+y+toty*2];
		for(int j=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j)
		if(!s[j].x)
		{
			if(s[j].y>0)
			{
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,y+s[j].y*t,i,1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,y,i,-1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x-eps,y+s[j].y*t,i,-1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x-eps,y,i,1});
			}
			else
			{
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,y,i,1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,y+s[j].y*t,i,-1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x-eps,y,i,-1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x-eps,y+s[j].y*t,i,1});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,c,i,1});
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x+s[j].x*t,c,i,-1});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x+s[j].x*t,c-eps,i,-1});
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,c-eps,i,1});
		}
	}
	for(map<double,int>::iterator it=mp.begin();it!=mp.end();++it) Solve(v[it->second],it->first);
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 200000
#define N 262144
#define INF 2000000000
#define eps 1e-8
#define magic 1010101015LL
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN+5];map<long long,long long> num;
int K,n,m,totx=0,toty=0,fx[MN+5],fy[MN+5],A[MN+5];
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind,x;double y;int id,ad;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return INF;else return (double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

int Find(int r,double y)
{
	int l=1,res=r+1,mid;
	while(l<=r)
	{
		mid=l+r>>1;
		if(L[mid]>y+eps) res=mid,r=mid-1;
		else l=mid+1;
	}
	return res-1;
}

void Solve(vector<ques> q,int ky,int kx)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(!kx) q.push_back((ques){1,fx[i],fy[i],A[i],0}),L[++cnt]=fy[i];
		else
		{
			double c=(double)fy[i]-(double)fx[i]*ky/kx;L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=Find(cnt,q[i].y);
			Renew(p,q[i].id);
		}
		else
		{
			int p=Find(cnt,q[i].y);
			if(p>0) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		if(s[i].x==0&&s[i].y<0) s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[magic*fx[i]+fy[i]]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read(),id;
		x-=t*totx;y-=t*toty;Ans[i]+=num[magic*x+y];
		for(int j=1,id=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j,id=(j-1)%(K>>1)+1)
		if(!s[j].x)
		{
			if(s[j].y<0)
			{
				v[id].push_back((ques){0,x,y,i,1});
				v[id].push_back((ques){0,x,y+s[j].y*t,i,-1});
				v[id].push_back((ques){0,x-1,y,i,-1});
				v[id].push_back((ques){0,x-1,y+s[j].y*t,i,1});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x,c,i,1});
			v[id].push_back((ques){0,x+s[j].x*t,c,i,-1});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[id].push_back((ques){0,x+s[j].x*t,c-2*eps,i,-1});
			v[id].push_back((ques){0,x,c-2*eps,i,1});
		}
	}
	for(int i=1;i<=K>>1;++i) Solve(v[i],s[i].y,s[i].x);
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<map>
#define MN 100000
#define N 131072
#define INF 2000000000
#define eps 1e-11
using namespace std;
inline int 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-'0';ch=getchar();}
	return x*f;
}
double L[MN+5];
map<double,int> mp;map<long long,long long> num;
int K,n,m,totx,toty,tot=0,fx[MN+5],fy[MN+5],A[MN+5];
long long Ans[MN+5],T[N*2+5];
struct vec{int x,y;double slop;}s[25];
bool cmps(const vec&a,const vec&b){return a.slop<b.slop;}
struct ques{int kind;double x,y;int id,ad;};
vector<ques> v[11];
inline double GetSlop(int y,int x){if(!x)return INF;else return(double)y/x;}
bool cmp(const ques&a,const ques&b){return a.x==b.x?a.kind>b.kind:a.x<b.x;}
void Renew(int x,int y){for(T[x+=N]+=y,x>>=1;x;x>>=1) T[x]=T[x<<1]+T[x<<1|1];}
long long Query(int l,int r)
{
	long long sum=0;
	for(l+=N-1,r+=N+1;l^r^1;l>>=1,r>>=1)
	{
		if(~l&1) sum+=T[l+1];
		if( r&1) sum+=T[r-1];
	}
	return sum;
}

void Solve(vector<ques>&q,double k)
{
//	cout<<"Solve"<<k<<endl;
	int cnt=0;memset(T,0,sizeof(T));
	for(int i=1;i<=n;++i)
		if(k==INF) q.push_back((ques){1,fx[i],fy[i],A[i],0}),L[++cnt]=fy[i];
		else
		{
			double c=fy[i]-k*fx[i];L[++cnt]=c;
			q.push_back((ques){1,fx[i],c,A[i],0});
		}
	sort(q.begin(),q.end(),cmp);
//	for(int i=0;i<q.size();++i) printf("%d %.8lf %.8lf %d %d\n",q[i].kind,q[i].x,q[i].y,q[i].id,q[i].ad);
	sort(L+1,L+cnt+1);cnt=unique(L+1,L+cnt+1)-L-1;
	for(int i=0;i<q.size();++i)
		if(q[i].kind)
		{
			int p=lower_bound(L+1,L+cnt+1,q[i].y)-L;
			Renew(p,q[i].id);
		}
		else
		{
			int p=upper_bound(L+1,L+cnt+1,q[i].y)-L-1;
			if(p) Ans[q[i].id]+=q[i].ad*Query(1,p);
		}
}

int main()
{
	K=read();n=read();m=read();
	for(int i=1;i<=K;++i)
	{
		s[i].x=read(),s[i].y=read();
		if(s[i].x<0) s[i].x=-s[i].x,s[i].y=-s[i].y;
		totx+=s[i].x,toty+=s[i].y,s[i].x<<=1,s[i].y<<=1;
	}
	for(int i=1;i<=K;++i) s[i].slop=atan2(s[i].y,s[i].x);
	sort(s+1,s+K+1,cmps);
	for(int i=1;i<=K;++i)
		if(!mp[GetSlop(s[i].y,s[i].x)]) mp[GetSlop(s[i].y,s[i].x)]=++tot;
	for(int i=1;i<=K;++i) s[i+K].x=-s[i].x,s[i+K].y=-s[i].y;K<<=1;
	for(int i=1;i<=n;++i)
		fx[i]=read(),fy[i]=read(),A[i]=read(),num[1LL*fx[i]*(1e9)+fy[i]]+=A[i];
	for(int i=1;i<=m;++i)
	{
		int x=read(),y=read(),t=read();
		x-=t*totx;y-=t*toty;int top=0;Ans[i]+=num[1LL*x*(1e9)+y];
		for(int j=1;j<=K;x+=s[j].x*t,y+=s[j].y*t,++j)
		if(!s[j].x)
		{
			if(s[j].y<0)
			{
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,y,i,1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,y+s[j].y*t,i,-1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x-eps,y,i,-1});
				v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x-eps,y+s[j].y*t,i,1});
			}
		}
		else if(s[j].x<0)
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,c,i,1});
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x+s[j].x*t,c,i,-1});
		}
		else
		{
			double c=y-(double)x*s[j].y/s[j].x;
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x+s[j].x*t,c-eps,i,-1});
			v[mp[GetSlop(s[j].y,s[j].x)]].push_back((ques){0,x,c-eps,i,1});
		}
	}
	for(map<double,int>::iterator it=mp.begin();it!=mp.end();++it) Solve(v[it->second],it->first);
	for(int i=1;i<=m;++i) printf("%lld\n",Ans[i]);
	return 0;
}