#include <bits/stdc++.h>
using namespace std;
int n, m;
long double XN[1005], YN[1005];
long double A[1005], B[1005];
long double D[1005][1005];
int o[1005], e[1005];
long double ab[1005][1005];
int N[1005];
long double phi = 180.0 / acos(-1);
int piv;
long double dist(long double ax, long double ay, long double bx,
                 long double by) {
  long double x = ax - bx;
  long double y = ay - by;
  x *= x;
  y *= y;
  return sqrt(x + y);
}
long double sqr(long double x) { return x * x; }
long double pang(int a, int b, int c) {
  long double y = D[a][b];
  long double x = D[b][c];
  long double r = D[a][c];
  long double rad = acos(y / r);
  long double ang = rad * phi;
  return ang;
}
long double ccw(int a, int b, int c) {
  long double ax = XN[b] - XN[a];
  long double ay = YN[b] - YN[a];
  long double bx = XN[c] - XN[a];
  long double by = YN[c] - YN[a];
  return ax * by - bx * ay;
}
bool cmp(int a, int b) {
  if (A[a] == A[b]) {
    if (B[a] == B[b]) return a > b;
    return B[a] < B[b];
  }
  return A[a] < A[b];
}
long double polar(int a, int b) {
  long double rad = atan2(YN[b] - YN[a], XN[b] - XN[a]);
  rad *= phi;
  return rad;
}
bool cmpang(int a, int b) { return ab[piv][a] < ab[piv][b]; }
long double mut(long double x) {
  if (x < 0) return -x;
  return x;
}
int solve(int a) {
  int oz = 0;
  for (int b = a + 1; b < n + m; b++) {
    o[oz++] = b;
  }
  piv = a;
  sort(o, o + oz, cmpang);
  int ans = 0;
  for (int i = 0; i < oz; i++) N[i] = (i + 1) % oz;
  for (int i = 0; i < oz; i++) {
    int b = o[i];
    if (b < n) {
      long double Min = 1e9;
      for (int j = N[i]; j != i; j = N[j]) {
        int c = o[j];
        long double ang = ab[a][c] - ab[a][b];
        if (ang < 0) ang += 360;
        if (ang > 180.00) break;
        long double ang1 = ab[b][c] - ab[b][a];
        long double ang2 = ab[b][a] - ab[b][c];
        if (ang1 < 0) ang1 += 360;
        if (ang2 < 0) ang2 += 360;
        ang = min(ang1, ang2);
        if (c < n) {
          if (Min <= ang) {
            ans++;
          }
        } else {
          Min = min(Min, ang);
        }
      }
    }
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n + m; i++) {
    scanf("%Lf%Lf", &XN[i], &YN[i]);
  }
  for (int i = 0; i < n + m; i++) {
    for (int j = 0; j < n + m; j++) {
      D[i][j] = dist(XN[i], YN[i], XN[j], YN[j]);
      if (i != j) ab[i][j] = polar(i, j);
    }
  }
  long long ans = n * 1LL * (n - 1) * 1LL * (n - 2) / 6;
  for (int i = 0; i < n; i++) {
    ans -= solve(i);
  }
  printf("%lld\n", ans);
  return 0;
}
