
  //Name : Rupa Dey
  //Date : 1st November 2020 //happy birthday Mhamuda
//joi sri gour hori gobindo...
//gobindo ja hobe vlor jonnoi hobe..
#include<bits/stdc++.h>
#define ll long long
#define d double
#define ld long double
#define vi vector<int>
#define vul vector<ull>
#define vl vector<ll>
#define pb push_back
#define si set<int>
#define sl set<ll>
#define yes cout<<"YES\n"<<endl
#define no cout<<"NO\n"<<endl
#define ys cout<<"Yes\n"<<endl
#define n0 cout<<"No\n"<<endl
#define test cin>>t; while(t--)
#define for(i,a,n) for(i=a;i<n;i++)
#define mp make_pair
#define ft first
#define sc second
#define gp ' ';
#define MAX 9999999
#define MOD 1000000007
#define nd endl
using namespace std;
int main()
{
   ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    if(n%2==0) cout<<"White"<<nd;
    else cout<<"Black"<<nd;
}
//hare krishna...
//hey gobindo kripa koro......
//only gobindo exists..^..

#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
  cin >> n;
  int t;
  vector<tuple<int, int, int>> v;
  while(cin >> t){
    int a, b;
    cin >> a >> b;
    v.push_back(make_tuple(t, a, b));
  }
  int ans = 0;
  for(int i=0; i<(int)v.size()-1; i++){
    for(int j=i+1; j<(int)v.size(); j++){
      bool hoge = false;
      bool temp0, temp1;
      if(get<0>(v.at(i))<=2 && get<0>(v.at(j))%2==1){
        temp0 = (get<1>(v.at(i)) <= get<2>(v.at(j))? true: false);
      }else{
        temp0 = (get<1>(v.at(i)) < get<2>(v.at(j))? true: false);
      }
      if(get<0>(v.at(i))%2==1 && get<0>(v.at(j))<=2){
        temp1 = (get<2>(v.at(i)) >= get<1>(v.at(j))? true: false);
      }else{
        temp1 = (get<2>(v.at(i)) > get<1>(v.at(j))? true: false);
      }
      ans+= temp0&&temp1;
      
    }
  }
  cout << ans << endl;
  return 0;
}