#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-6;
bool point_compare(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first == b.first ? a.second < b.second : a.first < b.first;
}
bool upper(const pair<int, int> &a, const pair<int, int> &b,
           const pair<int, int> &c) {
  if (c.first < a.first || c.first >= b.first) return false;
  double slope = double(b.second - a.second) / (b.first - a.first);
  double d_y = slope * (c.first - a.first) + a.second;
  if (c.second - EPS >= d_y) return true;
  return false;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > rp, bp;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    rp.push_back(make_pair(x, y));
  }
  sort(rp.begin(), rp.end(), point_compare);
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    bp.push_back(make_pair(x, y));
  }
  vector<vector<int> > sum(n, vector<int>(n));
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      for (int k = 0; k < m; ++k)
        if (upper(rp[i], rp[j], bp[k])) {
          ++sum[i][j];
        }
  int ans = 0;
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      for (int k = j + 1; k < n; ++k) {
        if (sum[i][j] + sum[j][k] == sum[i][k]) ++ans;
      }
  cout << ans << endl;
  return 0;
}
