description: This is the easy version of the problem. The only difference from the hard version is that in this version all coordinates are even.
  
  There are n fence-posts at distinct coordinates on a plane. It is guaranteed that no three fence posts lie on the same line.
  
  There are an infinite number of cows on the plane, one at every point with integer coordinates.
  
  Gregor is a member of the Illuminati, and wants to build a triangular fence, connecting 3 distinct existing fence posts. A cow strictly inside the fence is said to be enclosed. If there are an odd number of enclosed cows and the area of the fence is an integer, the fence is said to be interesting.
  
  Find the number of interesting fences.
  
  Input
  
  The first line contains the integer n (3 ≤ n ≤ 6000), the number of fence posts which Gregor can choose to form the vertices of a fence.
  
  Each of the next n line contains two integers x and y (0 ≤ x,y ≤ 10^7, x and y are even), where (x,y) is the coordinate of a fence post. All fence posts lie at distinct coordinates. No three fence posts are on the same line.
  
  Output
  
  Print a single integer, the number of interesting fences. Two fences are considered different if they are constructed with a different set of three fence posts.
  
  Examples
  
  Input
  
  
  3
  0 0
  2 0
  0 4
  
  
  Output
  
  
  1
  
  
  Input
  
  
  5
  0 0
  2 16
  30 14
  4 6
  2 10
  
  
  Output
  
  
  3
  
  Note
  
  In the first example, there is only 1 fence. That fence is interesting since its area is 4 and there is 1 enclosed cow, marked in red.
  
  <image>
  
  In the second example, there are 3 interesting fences. 
  
    * (0,0) — (30,14) — (2,10) 
    * (2,16) — (30,14) — (2,10) 
    * (30,14) — (4,6) — (2,10) 
solution: #include <bits/stdc++.h>
  using namespace std;
  using i64 = long long;
  struct Pt {
    Pt() {}
    Pt(int x, int y) : x(x), y(y){};
    void Read() { scanf("%d%d", &x, &y); }
    int x, y;
  };
  i64 calc(vector<Pt>& a) {
    for (Pt& p : a) {
      assert(p.x % 2 == 0);
      assert(p.y % 2 == 0);
      p.x /= 2;
      p.y /= 2;
      p.x = abs(p.x) % 2;
      p.y = abs(p.y) % 2;
    }
    auto gcd2 = [](int x, int y) {
      if (x % 2 == 0 && y % 2 == 0) return 2;
      return 1;
    };
    vector<vector<i64>> cnt(2, vector<i64>(2));
    i64 ans = 0;
    for (Pt& p : a) {
      for (int x = 0; x < 2; ++x) {
        for (int y = 0; y < 2; ++y) {
          int odd = gcd2(p.x, p.y) + gcd2(x, y) + gcd2(x - p.x, y - p.y);
          if (odd % 2 == 0) {
            ans += cnt[x][y];
          }
        }
      }
      cnt[p.x][p.y]++;
    }
    return ans;
  }
  void solve() {
    int n;
    scanf("%d", &n);
    vector<Pt> a(n);
    for (Pt& p : a) p.Read();
    i64 ans = 0;
    for (int i = 0; i < n; ++i) {
      vector<Pt> b;
      for (int j = i + 1; j < n; ++j) {
        b.emplace_back(a[j].x - a[i].x, a[j].y - a[i].y);
      }
      ans += calc(b);
    }
    cout << ans << endl;
  }
  int main() {
    int tests = 1;
    for (int t = 0; t < tests; ++t) {
      solve();
    }
    return 0;
  }
  