#include <bits/stdc++.h>
using namespace std;
template <class T>
int size(const T &a) {
  return (int)a.size();
}
template <class T>
T sqr(const T &a) {
  return a * a;
}
struct SPoint {
  bool red;
  int x, y;
  int q;
  inline void scan(bool r) {
    red = r;
    scanf("%d %d", &x, &y);
  }
  inline void operator-=(const SPoint &p) {
    x -= p.x;
    y -= p.y;
    if (x >= 0) {
      if (y >= 0) {
        q = 1;
      } else {
        q = 4;
      }
    } else {
      q = (y >= 0 ? 2 : 3);
    }
  }
  inline long long operator*(const SPoint &p) const {
    return (long long)x * p.y - (long long)y * p.x;
  }
  inline bool operator<(const SPoint &p) const {
    if (q != p.q) return q < p.q;
    return (*this) * p > 0;
  }
} p[1000], _q[1000], *q[1000];
inline bool cmp(SPoint *a, SPoint *b) { return (*a) < (*b); }
int main() {
  cout << setiosflags(ios::fixed) << setprecision(10);
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    p[i].scan(0);
  }
  for (int j = 0; j < m; j++) {
    p[n + j].scan(1);
  }
  int res = 0;
  for (int i = 0; i < n; i++) {
    int u = 0;
    for (int j = i + 1; j < n + m; j++) {
      if (i == j) continue;
      _q[u] = p[j];
      _q[u] -= p[i];
      q[u] = _q + u;
      u++;
    }
    sort(q, q + u, cmp);
    for (int i = 0; i < u; i++) {
      if (q[i]->red) continue;
      long long a0 = -q[i]->y, b0 = q[i]->x, c0 = 0, a = a0, b = b0, c = c0;
      for (int j = (i == u - 1 ? 0 : i + 1); j != i;
           (j == u - 1 ? j = 0 : j++)) {
        if (q[j]->x * a0 + q[j]->y * b0 + c0 <= 0) break;
        if (q[j]->red) {
          if (a * (q[j]->x - q[i]->x) - b * (-(q[j]->y - q[i]->y)) > 0) {
            a = -(q[j]->y - q[i]->y);
            b = q[j]->x - q[i]->x;
            c = -a * q[i]->x - b * q[i]->y;
          }
        } else {
          if (q[j]->x * a + q[j]->y * b + c > 0) {
            res++;
          }
        }
      }
    }
  }
  cout << res;
  return 0;
}
