#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y, type;
};
int N, M;
Point R[500], B[500], P[1000], pivot;
bool used[500];
Point operator-(const Point &p1, const Point &p2) {
  return Point{p1.x - p2.x, p1.y - p2.y};
}
int quadrant(const Point &p) {
  if (p.x >= 0 && p.y >= 0) return 1;
  if (p.x <= 0 && p.y >= 0) return 2;
  if (p.x <= 0 && p.y <= 0) return 3;
  return 4;
}
long long cross(const Point &p1, const Point &p2) {
  return (long long)p1.x * p2.y - (long long)p1.y * p2.x;
}
bool operator<(const Point &p1, const Point &p2) {
  int q1 = quadrant(p1 - pivot), q2 = quadrant(p2 - pivot);
  if (q1 != q2) return q1 < q2;
  return cross(p1 - pivot, p2 - pivot) > 0;
}
int main() {
  while (cin >> N >> M) {
    for (int i = 0; i < N; i++) scanf("%d %d", &R[i].x, &R[i].y), R[i].type = 0;
    for (int i = 0; i < M; i++) scanf("%d %d", &B[i].x, &B[i].y), B[i].type = 1;
    memset(used, 0, sizeof(used));
    int x = 0;
    for (int i = 0; i < N; i++) {
      used[i] = 1;
      pivot = R[i];
      int cnt = 0;
      for (int j = 0; j < N; j++)
        if (!used[j]) P[cnt++] = R[j];
      for (int j = 0; j < M; j++) P[cnt++] = B[j];
      sort(P, P + cnt);
      for (int j = 0; j < cnt; j++) {
        if (P[j].type == 0) {
          int last = -1;
          for (int k = (j + 1 == cnt ? 0 : j + 1); k != j;
               k = (k + 1 == cnt ? 0 : k + 1)) {
            bool ok = (last == -1 || cross(P[last] - P[j], P[k] - P[j]) > 0);
            if (P[k].type == 0) {
              if (cross(P[j] - R[i], P[k] - R[i]) < 0) break;
              if (ok) x++;
            } else if (ok)
              last = k;
          }
        }
      }
    }
    printf("%d\n", x);
  }
  return 0;
}
