#include <bits/stdc++.h>
using namespace std;
int n, m;
int cnt[501][501];
pair<int, int> a[501], b[501];
long long ccw(pair<int, int> O, pair<int, int> A, pair<int, int> B) {
  return 1LL * (A.first - O.first) * (B.second - O.second) -
         1LL * (A.second - O.second) * (B.first - O.first);
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%d %d", &a[i].first, &a[i].second);
  for (int i = 0; i < m; ++i) scanf("%d %d", &b[i].first, &b[i].second);
  sort(a, a + n);
  sort(b, b + m);
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      for (int k = 0; k < m; ++k) {
        if (b[k].first >= a[i].first && b[k].first < a[j].first &&
            ccw(a[i], a[j], b[k]) < 0)
          cnt[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) {
        int A = cnt[i][j], B = cnt[j][k], C = cnt[i][k];
        if (A + B == C) ++res;
      }
    }
  }
  printf("%d", res);
}
