#include <bits/stdc++.h>
using namespace std;
const int N = 550;
int n, m, f[N][N], ans;
struct point {
  long long x, y;
  bool operator<(const point &a) const { return y < a.y; }
} red[N], bl[N];
inline 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 - c.y * a.x;
}
inline 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() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%lld%lld", &red[i].x, &red[i].y);
  for (int i = 1; i <= m; ++i) scanf("%lld%lld", &bl[i].x, &bl[i].y);
  sort(red + 1, red + 1 + n);
  for (int i = 1; i < n; ++i)
    for (int j = i + 1; j <= n; ++j)
      for (int k = 1; k <= m; ++k)
        if (toleft(red[i], red[j], bl[k])) f[i][j]++;
  for (int i = 1; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      for (int k = j + 1; k <= n; ++k)
        if (f[i][j] + f[j][k] == f[i][k]) ans++;
  printf("%d\n", ans);
  return 0;
}
