#include <bits/stdc++.h>
using namespace std;
const long long N = 505;
const long long mod = 1e9 + 7;
const long long oo = 1e15 + 9;
struct cond {
  long long x, y;
} r[N], b[N];
long long dem[N][N];
long long n, m;
long long load(cond x, cond y, cond z) {
  cond A;
  A.x = y.x - x.x, A.y = y.y - x.y;
  cond B;
  B.x = z.x - x.x, B.y = z.y - x.y;
  return A.x * B.y - A.y * B.x;
}
bool cmp(const cond x, const cond y) {
  if (x.x != y.x)
    return x.x < y.x;
  else
    return x.y > y.y;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (long long i = 1; i <= n; ++i) cin >> r[i].x >> r[i].y;
  for (long long i = 1; i <= m; ++i) cin >> b[i].x >> b[i].y;
  sort(r + 1, r + n + 1, cmp);
  for (long long i = 1; i < n; ++i)
    for (long long j = i + 1; j <= n; ++j) {
      long long res = 0;
      cond x = r[i], y = r[j];
      for (long long t = 1; t <= m; ++t)
        if (b[t].x >= x.x && b[t].x < y.x) {
          long long tmp = load(x, y, b[t]);
          if (tmp <= 0) res++;
        }
      dem[i][j] = dem[j][i] = res;
    }
  long long ans = 0;
  for (long long i = 1; i < n - 1; ++i)
    for (long long j = i + 1; j < n; ++j)
      for (long long t = j + 1; t <= n; ++t) {
        if (dem[i][j] + dem[j][t] == dem[i][t]) ans++;
      }
  cout << ans;
}
