#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1011;
struct Point {
  long long x, y;
  long long color;
  Point() {}
  Point(long long x, long long y) : x(x), y(y) {}
  Point operator-(const Point& a) const { return Point(x - a.x, y - a.y); }
  long long operator%(const Point& a) const { return x * a.y - y * a.x; }
  void read() { cin >> x >> y; }
  friend ostream& operator<<(ostream& cout, Point& p) {
    cout << p.x << " " << p.y;
    return cout;
  }
} red[MAXN], blue[MAXN], cur[MAXN];
long long nRed, nBlue, n;
bool operator>(const Point& a, const Point& b) {
  if (a.y > b.y) return true;
  if (a.y < b.y) return false;
  return (a.x > b.x);
}
long long ccw(const Point& a, const Point& b, const Point& c) {
  long long t = (b - a) % (c - a);
  if (t == 0) return 0;
  if (t < 0) return -1;
  return 1;
}
long long RE_TRAI = ccw(Point(0, 0), Point(0, 1), Point(-1, 1));
long long RE_PHAI = ccw(Point(0, 0), Point(0, 1), Point(1, 1));
long long RED = 1;
long long BLUE = 0;
Point origin;
bool cmp(const Point& a, const Point& b) {
  long long t = ccw(origin, a, b);
  if (t == RE_TRAI) return true;
  return false;
}
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> nRed >> nBlue) {
    for (long long i = 1; i <= nRed; i++) red[i].read();
    for (long long i = 1; i <= nBlue; i++) blue[i].read();
    long long res = 0;
    for (long long i = 1; i <= nRed; i++) {
      n = 0;
      for (long long j = 1; j <= nRed; j++) {
        if (red[j] > red[i]) {
          ++n;
          cur[n] = red[j];
          cur[n].color = RED;
        }
      }
      for (long long j = 1; j <= nBlue; j++) {
        if (blue[j] > red[i]) {
          ++n;
          cur[n] = blue[j];
          cur[n].color = BLUE;
        }
      }
      origin = red[i];
      sort(cur + 1, cur + n + 1, cmp);
      for (long long j = 1; j <= n; j++)
        if (cur[j].color == RED) {
          bool hasBlue = 0;
          Point minBlue;
          for (long long k = j + 1; k <= n; k++) {
            if (cur[k].color == BLUE) {
              if (!hasBlue) {
                hasBlue = true;
                minBlue = cur[k];
              } else {
                if (ccw(cur[j], minBlue, cur[k]) == RE_TRAI) {
                  minBlue = cur[k];
                }
              }
            } else {
              if (!hasBlue) {
                res++;
              } else {
                if (ccw(cur[j], minBlue, cur[k]) == RE_TRAI) {
                  res++;
                }
              }
            }
          }
        }
    }
    cout << res << endl;
  }
}
