#include <bits/stdc++.h>
using namespace std;
const int MAXN = 505;
struct Node {
  long long x, y;
  Node() {}
  Node(int _x, int _y) : x(_x), y(_y) {}
  Node operator-(const Node &t) const { return Node(x - t.x, y - t.y); }
  long long operator*(const Node &t) const { return x * t.y - y * t.x; }
} r[MAXN], b[MAXN], o;
int dp[MAXN][MAXN];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> r[i].x >> r[i].y;
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i].x >> b[i].y;
  }
  o.x = 1e9 + 1, o.y = 1e9 + 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if ((r[i] - o) * (r[j] - o) <= 0) continue;
      for (int k = 1; k <= m; k++) {
        if ((r[i] - o) * (b[k] - o) >= 0 && (r[j] - r[i]) * (b[k] - r[i]) > 0 &&
            (o - r[j]) * (b[k] - r[j]) > 0) {
          dp[i][j]++;
        }
      }
      dp[j][i] = -dp[i][j];
    }
  }
  long long ans = (long long)0;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      for (int k = j + 1; k <= n; k++) {
        ans += (dp[i][j] + dp[j][k] + dp[k][i] == 0);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
