#include <bits/stdc++.h>
using namespace std;
complex<int> Red[500], Blue[500];
int Cnt[500][500];
bool comp(const complex<int>& a, const complex<int>& b) {
  return a.real() < b.real();
}
int outerSign(const complex<int>& a, const complex<int>& b) {
  return ((long long)a.real() * b.imag() - (long long)a.imag() * b.real()) > 0
             ? 1
             : -1;
}
int iSgn(int i) { return (i > 0) ? 1 : (i < 0) ? -1 : 0; }
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int q = 0; q < n; ++q) {
    int a, b;
    scanf("%d %d", &a, &b);
    Red[q] = complex<int>(a, b);
  }
  for (int q = 0; q < m; ++q) {
    int a, b;
    scanf("%d %d", &a, &b);
    Blue[q] = complex<int>(a, b);
  }
  sort(Red, Red + n, comp);
  sort(Blue, Blue + m, comp);
  int begin = 0;
  for (int q = 0; q < n; ++q) {
    while (begin < m && Blue[begin].real() < Red[q].real()) begin++;
    for (int w = q + 1; w < n; ++w) {
      for (int e = begin; e < m; ++e) {
        if (Blue[e].real() >= Red[w].real()) break;
        if (outerSign(Blue[e] - Red[q], Red[w] - Red[q]) > 0) {
          Cnt[q][w]++;
          Cnt[w][q]++;
        }
      }
    }
  }
  int ret = 0;
  for (int q = 0; q < n; ++q)
    for (int w = q + 1; w < n; ++w)
      for (int e = w + 1; e < n; ++e) {
        int triSign = outerSign(Red[w] - Red[q], Red[e] - Red[q]);
        int blues = -triSign * iSgn(Red[w].real() - Red[q].real()) * Cnt[q][w] -
                    triSign * iSgn(Red[e].real() - Red[w].real()) * Cnt[w][e] -
                    triSign * iSgn(Red[q].real() - Red[e].real()) * Cnt[e][q];
        if (!blues) ret++;
      }
  printf("%d\n", ret);
  return 0;
}
