#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
};
long long ccw(point o, point u, point v) {
  point fir = {u.x - o.x, u.y - o.y};
  point sec = {v.x - o.x, v.y - o.y};
  return 1ll * fir.x * sec.y - 1ll * fir.y * sec.x;
}
bool cmp(point a, point b) { return (a.x < b.x); }
int main() {
  map<int, int> M;
  int n, m, i, j, k;
  cin >> n >> m;
  point a[n], b[m];
  for (i = 0; i < n; ++i) scanf("%d %d", &a[i].x, &a[i].y);
  for (i = 0; i < m; ++i) {
    scanf("%d %d", &b[i].x, &b[i].y);
    M[b[i].x]++;
  }
  int cnt[n][n];
  for (i = 0; i < n; ++i) {
    for (j = 0; j < n; ++j) {
      cnt[i][j] = 0;
    }
  }
  sort(a, a + n, cmp);
  for (i = 0; i < n; ++i) {
    for (j = i + 1; j < n; ++j) {
      for (k = 0; k < m; ++k) {
        if (b[k].x >= a[i].x && b[k].x < a[j].x) {
          if (ccw(b[k], a[i], a[j]) < 0) {
            cnt[i][j]++;
          }
        }
      }
      cnt[j][i] = -cnt[i][j];
    }
  }
  int ans = 0;
  for (i = 0; i < n; ++i) {
    for (j = i + 1; j < n; ++j) {
      for (k = j + 1; k < n; ++k) {
        if (cnt[i][j] + cnt[j][k] + cnt[k][i] == 0) {
          ++ans;
        }
      }
    }
  }
  cout << ans;
}
