#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000000")
using namespace std;
const double INF = 2e50;
double sqr(double a) { return a * a; }
int get_ch(double x, double y) {
  if (x <= 0 && y <= 0) return 1;
  if (x <= 0 && y >= 0) return 4;
  if (x >= 0 && y <= 0) return 2;
  return 3;
}
struct pt {
  double x, y;
  pt(double x, double y) : x(x), y(y) {}
  pt() {}
  void read() { cin >> x >> y; }
  double d() { return sqrt(sqr(x) + sqr(y)); }
  pt operator-(pt ot) { return pt(x - ot.x, y - ot.y); }
  bool operator==(pt ot) { return x == ot.x && y == ot.y; }
  double operator*(const pt ot) const { return (x * ot.y - y * ot.x); }
  bool operator<(const pt f) const {
    int a = get_ch(x, y);
    int b = get_ch(f.x, f.y);
    return (a < b || (a == b && (*this) * f >= 0));
  }
};
inline double get_an(pt f, pt s) {
  return acos((f.x * s.x + f.y * s.y) / f.d() / s.d());
}
inline double vec_m(pt f, pt s) { return (f.x * s.y - f.y * s.x); }
double with_a[501][501], with_b[501][501];
int main() {
  int n, m;
  cin >> n >> m;
  if (!m) {
    cout << n * (n - 1) * (n - 2) / 6;
    return 0;
  }
  vector<pt> f(n), s(m);
  for (int i = 0; i < n; i++) {
    f[i].read();
  }
  for (int i = 0; i < m; i++) {
    s[i].read();
  }
  double ans = 0;
  for (int i = 0; i < n; i++) {
    vector<pair<pt, pair<int, int> > > ev(n + m - 1 - i);
    int sz = 0;
    for (int j = i + 1; j < n; j++) {
      if (j == i) continue;
      ev[sz++] = make_pair(f[j] - f[i], make_pair(0, j));
    }
    for (int j = 0; j < m; j++) {
      ev[sz++] = make_pair(s[j] - f[i], make_pair(1, j));
    }
    sort(ev.begin(), ev.end());
    for (int j = 0; j < (int)ev.size(); j++) {
      pt maxi = pt(INF, INF);
      int id = ev[j].second.second;
      if (ev[j].second.first) continue;
      for (int k = (j + 1) % (int)ev.size();; k = (k + 1) % (int)ev.size()) {
        if (k == j) break;
        int type = ev[k].second.first;
        int to_id = ev[k].second.second;
        pt temp = (type ? s[to_id] : f[to_id]);
        double to_an = vec_m(f[id] - f[i], temp - f[i]);
        if (to_an < 0) break;
        if (type) {
          if (maxi == pt(INF, INF) || vec_m(maxi - f[id], temp - f[id]) > 0) {
            maxi = temp;
          }
        } else {
          if (maxi == pt(INF, INF) || vec_m(maxi - f[id], temp - maxi) > 0) {
            ans++;
          }
        }
      }
    }
  }
  cout << fixed << setprecision(0) << ans;
}
