#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  int c;
  double theta;
  Point() : x(0), y(0) {}
  Point(long long _x, long long _y) : x(_x), y(_y) {}
  Point(long long _x, long long _y, int _c) : x(_x), y(_y), c(_c) {
    theta = atan2(_y, _x);
  }
  bool operator<(const Point &b) const { return tie(x, y) < tie(b.x, b.y); }
  bool operator==(const Point &b) const { return tie(x, y) == tie(b.x, b.y); }
  Point operator+(const Point &b) const { return Point(x + b.x, y + b.y); }
  Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
  long long operator*(const Point &b) const { return x * b.x + y * b.y; }
  long long operator%(const Point &b) const { return x * b.y - y * b.x; }
  Point operator*(const long long &b) const { return Point(x * b, y * b); }
};
int N, M, np;
vector<Point> pt;
Point pt2[1024];
bool comp(Point a, Point b) { return a.theta < b.theta; }
int calc(Point o) {
  int res = 0;
  for (int i = 0; i < np; i++) {
    if (pt2[i].c) continue;
    Point v = pt2[i] - o;
    for (int j = i + 1; j < np; j++) {
      Point v2 = pt2[j] - pt2[i];
      if (pt2[j].c) {
        if (v % v2 > 0) {
          v = v2;
        }
      } else {
        if (v % v2 > 0) {
          res++;
        }
      }
    }
  }
  return res;
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    int x, y;
    cin >> x >> y;
    pt.push_back(Point(x, y, 0));
  }
  for (int i = 0; i < M; i++) {
    int x, y;
    cin >> x >> y;
    pt.push_back(Point(x, y, 1));
  }
  sort(pt.begin(), pt.end());
  int ans = 0;
  for (int i = 0; i < (int)pt.size(); i++) {
    if (pt[i].c) continue;
    np = 0;
    for (int j = i + 1; j < (int)pt.size(); j++) {
      pt2[np] = pt[j];
      pt2[np].theta = atan2(pt[j].y - pt[i].y, pt[j].x - pt[i].x);
      np++;
    }
    sort(pt2, pt2 + np, comp);
    ans += calc(pt[i]);
  }
  cout << ans << endl;
  return 0;
}
