#include <bits/stdc++.h>
using namespace std;
int n, m;
struct point {
  int x, y;
} a[1024], *b = a + 0x200;
int o[1024];
__attribute__((aligned(16))) int g[16];
__attribute__((aligned(16))) char f[8015936];
bool operator<(const point &p, const point &q) { return p.x < q.x; }
bool cmp(int i, int j) {
  return (long long)a[i].x * a[j].y < (long long)a[i].y * a[j].x;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%d%d", &a[i].x, &a[i].y);
  sort(a, a + n);
  for (int i = 0; i < m; ++i) scanf("%d%d", &b[i].x, &b[i].y);
  sort(b, b + m);
  fill(b + m, b + 512, (point){-1u / 2, -1u / 2});
  volatile int res = 0;
  for (int i = 0; i < n; ++i) {
    int l = 0;
    for (int j = i; j--; o[l++] = j) {
      a[j].x -= a[i].x;
      a[j].y -= a[i].y;
    }
    for (int j = 0; j < m && b[j].x < a[i].x; o[l++] = j++ | 0x200) {
      b[j].x -= a[i].x;
      b[j].y -= a[i].y;
    }
    memset(g, 0, sizeof g);
    sort(o, o + l, cmp);
    char *fi = f + (i * (i - 1) << 5), *fj = f;
    for (int *j = o + l; j-- != o;)
      if (*j < 0x200)
        memcpy(fi + (*j << 6), g, 64);
      else
        g[*j - 0x200 >> 5] |= 1u << (*j & 0x1f);
    for (int j = 0, e = 0; j < i; fi -= j++ << 6) {
      for (; e < m && b[e].x < a[j].x; ++e) g[e >> 5] &= ~(1u << (e & 0x1f));
      __asm(
          "movdqa 0(%0), %%xmm4 \n\t"
          "movdqa 16(%0), %%xmm5 \n\t"
          "movdqa 32(%0), %%xmm6 \n\t"
          "movdqa 48(%0), %%xmm7 \n\t"
          "movdqa 0(%1), %%xmm0 \n\t"
          "movdqa 16(%1), %%xmm1 \n\t"
          "movdqa 32(%1), %%xmm2 \n\t"
          "movdqa 48(%1), %%xmm3 \n\t"
          "andpd %%xmm0, %%xmm4 \n\t"
          "andpd %%xmm1, %%xmm5 \n\t"
          "andpd %%xmm2, %%xmm6 \n\t"
          "andpd %%xmm3, %%xmm7 \n\t"
          "movdqa %%xmm4, 0(%0) \n\t"
          "movdqa %%xmm5, 16(%0) \n\t"
          "movdqa %%xmm6, 32(%0) \n\t"
          "movdqa %%xmm7, 48(%0) \n\t"
          "xorpd %%xmm3, %%xmm3 \n\t"
          :
          : "r"(fi + (j << 6)), "r"(g)
          :);
      for (int k = j; k--; fi += 64, fj += 64)
        __asm(
            "xorpd %%xmm0, %%xmm0 \n\t"
            "movdqa 0(%1), %%xmm1 \n\t"
            "movdqa 0(%2), %%xmm2 \n\t"
            "xorpd %%xmm4, %%xmm2 \n\t"
            "xorpd %%xmm2, %%xmm1 \n\t"
            "orpd %%xmm1, %%xmm0 \n\t"
            "movdqa 16(%1), %%xmm1 \n\t"
            "movdqa 16(%2), %%xmm2 \n\t"
            "xorpd %%xmm5, %%xmm2 \n\t"
            "xorpd %%xmm2, %%xmm1 \n\t"
            "orpd %%xmm1, %%xmm0 \n\t"
            "movdqa 32(%1), %%xmm1 \n\t"
            "movdqa 32(%2), %%xmm2 \n\t"
            "xorpd %%xmm6, %%xmm2 \n\t"
            "xorpd %%xmm2, %%xmm1 \n\t"
            "orpd %%xmm1, %%xmm0 \n\t"
            "movdqa 48(%1), %%xmm1 \n\t"
            "movdqa 48(%2), %%xmm2 \n\t"
            "xorpd %%xmm7, %%xmm2 \n\t"
            "xorpd %%xmm2, %%xmm1 \n\t"
            "orpd %%xmm1, %%xmm0 \n\t"
            "movmskps %%xmm0, %%eax \n\t"
            "cmpb $0, %%al \n\t"
            "jne nxt \n\t"
            "cmpps $0, %%xmm3, %%xmm0 \n\t"
            "movmskps %%xmm0, %%eax \n\t"
            "cmpb $15, %%al \n\t"
            "jne nxt \n\t"
            "incl %0 \n\t"
            "nxt: \n\t"
            : "=m"(res)
            : "r"(fi), "r"(fj)
            : "%eax");
    }
    for (int *j = o + l; j-- != o;) {
      a[*j].x += a[i].x;
      a[*j].y += a[i].y;
    }
  }
  printf("%d\n", res);
  return 0;
}
