#include <bits/stdc++.h>
using namespace std;
long long f[501][501];
pair<long long, long long> r[501];
pair<long long, long long> b[501];
bool ccw(pair<long long, long long> o, pair<long long, long long> a,
         pair<long long, long long> b) {
  b.first -= o.first;
  b.second -= o.second;
  a.second -= o.second;
  a.first -= o.first;
  if (a.first * b.second < a.second * b.first) return true;
  return false;
}
int main() {
  long long n, m, x, y, ans = 0;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> r[i].first >> r[i].second;
  for (int i = 0; i < m; i++) cin >> b[i].first >> b[i].second;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (r[i].first < r[j].first) {
        for (int k = 0; k < m; k++) {
          if (ccw(b[k], r[i], r[j]) && b[k].first > r[i].first &&
              b[k].first <= r[j].first)
            f[i][j]++;
        }
        f[j][i] = -f[i][j];
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      for (int k = j + 1; k < n; k++)
        if (f[i][j] + f[j][k] == f[i][k]) ans++;
    }
  }
  cout << ans;
}
