#include <bits/stdc++.h>
using namespace std;
const int maxn = 500 + 5;
long long n, m, ans;
struct point {
  long long x, y;
  bool operator<(const point &a) const { return y < a.y; }
} a[maxn], b[maxn];
long long p[maxn][maxn];
long long calc(point a, point b, point c) {
  return c.x * (b.y - a.y) - c.y * (b.x - a.x) + b.x * a.y - a.x * b.y;
}
int main() {
  scanf("%lld%lld", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%lld%lld", &a[i].x, &a[i].y);
  for (int i = 1; i <= m; ++i) scanf("%lld%lld", &b[i].x, &b[i].y);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j) {
      for (int k = 1; k <= m; ++k) {
        if (b[k].y >= a[j].y || b[k].y < a[i].y) continue;
        if (calc(a[i], a[j], b[k]) > 0) ++p[i][j];
      }
    }
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      for (int k = j + 1; k <= n; ++k) {
        if (p[i][j] + p[j][k] == p[i][k]) ++ans;
      }
  printf("%lld\n", ans);
  return 0;
}
