#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int n, m, f[N][N];
pair<long long, long long> a[N], b[N];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> a[i].first >> a[i].second;
  sort(a, a + n);
  for (int i = 0; i < m; ++i) cin >> b[i].first >> b[i].second;
  sort(b, b + m);
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      long long y = a[j].first - a[i].first;
      long long x = a[i].second - a[j].second;
      long long z = -(x * a[i].first + y * a[i].second);
      for (int k = 0; k < m; ++k)
        if (x * b[k].first + y * b[k].second + z < 0 &&
            b[k].first > a[i].first && b[k].first <= a[j].first)
          f[i][j]++;
    }
  }
  int res = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      for (int k = j + 1; k < n; ++k) {
        res += !(f[i][j] + f[j][k] - f[i][k]);
      }
    }
  }
  cout << res;
}
