#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<int, int> a[510], b[510];
pair<int, int> operator-(pair<int, int> a, pair<int, int> b) {
  a.first -= b.first;
  a.second -= b.second;
  return a;
}
bool ccw(pair<int, int> a, pair<int, int> b, pair<int, int> c) {
  c = c - b;
  b = b - a;
  return 1ll * b.first * c.second > 1ll * b.second * c.first;
}
int cnt[510][510];
int mark[510];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> a[i].first >> a[i].second;
  for (int i = 1; i <= m; ++i) cin >> b[i].first >> b[i].second;
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      if (a[i].first == b[j].first && a[i].second >= b[j].second) ++mark[i];
    }
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j) {
      for (int k = 1; k <= m; ++k) {
        if (a[i].first <= b[k].first && b[k].first <= a[j].first) {
          cnt[i][j] = cnt[i][j] + ccw(b[k], a[j], a[i]);
        }
      }
    }
  int ans = 0;
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      for (int k = j + 1; k <= n; ++k) {
        int delta = cnt[i][k] - (cnt[i][j] + cnt[j][k] - mark[j]);
        if (!delta) ++ans;
      }
  cout << ans;
  return 0;
}
