#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
} red[550], blue[550];
int f[550][550];
bool compare(point a, point b) { return a.y < b.y; }
long long area(point a, point b, point c) {
  return a.x * b.y - a.y * b.x + b.x * c.y - b.y * c.x + c.x * a.y - a.x * c.y;
}
bool toLeft(point a, point b, point c) {
  if (c.y <= a.y || c.y > b.y) return 0;
  return area(a, b, c) > 0;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> red[i].x >> red[i].y;
  sort(red, red + n, compare);
  for (int i = 0; i < m; i++) cin >> blue[i].x >> blue[i].y;
  int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      for (int k = 0; k < m; k++) {
        if (toLeft(red[i], red[j], blue[k])) {
          f[i][j]++;
        }
      }
    }
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n - 1; j++) {
      for (int k = j + 1; k < n; k++) {
        if (f[i][j] + f[j][k] == f[i][k]) {
          ans++;
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}
