#include <bits/stdc++.h>
const int Debug = 1;
using namespace std;
template <class T>
void ckmin(T &a, T b) {
  if (a > b) {
    a = b;
  }
}
template <class T>
void ckmax(T &a, T b) {
  if (a < b) {
    a = b;
  }
}
template <class T>
void pr(T &a) {
  cout << a << ' ';
}
int countbit(int n) { return n == 0 ? 0 : 1 + countbit(n & (n - 1)); }
const int maxint = 0x7fffffff;
const long long max64 = 0x7fffffffffffffffll;
const int N = 512;
struct point_t {
  double x, y;
  point_t() {}
  point_t(double a, double b) { x = a, y = b; }
  void read() { scanf("%lf %lf", &x, &y); }
} red[N], blue[N];
point_t operator+(point_t a, point_t b) {
  return point_t(a.x + b.x, a.y + b.y);
}
point_t operator-(point_t a, point_t b) {
  return point_t(a.x - b.x, a.y - b.y);
}
double cross_mul2(point_t a, point_t b) { return a.x * b.y - a.y * b.x; }
double dot_mul2(point_t a, point_t b) { return a.x * b.x + a.y * b.y; }
bool cmp(point_t a, point_t b) {
  return (a.x < b.x) || (a.x == b.x && a.y < b.y);
}
int dp[N][N];
int n, m;
bool between(double a, double b, double c) { return b < a && a <= c; }
int main() {
  int i, j, k, ans = 0;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    red[i].read();
  }
  for (i = 0; i < m; i++) {
    blue[i].read();
  }
  sort(red, red + n, cmp);
  sort(blue, blue + m, cmp);
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      for (k = 0; k < m; k++) {
        if (between(blue[k].x, red[i].x, red[j].x) &&
            cross_mul2(red[j] - red[i], blue[k] - red[i]) > 0) {
          dp[i][j]++;
        }
      }
    }
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      for (k = j + 1; k < n; k++) {
        if (dp[i][j] + dp[j][k] == dp[i][k]) {
          ans++;
        }
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
