#include <bits/stdc++.h>
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	long long int t;
	cin >> t;
	long long int sum = 0, a, b;
	for (long long int i = 0; i < t; i++)
	{
		cin >> a >> b;
		long long int ans;
		ans = ((b - a + 1) * (a + b)) / 2;
		sum = sum + ans;
	}
	cout << sum;

	return 0;
}
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() { // 入力が相違を保証していることを見落とすときつい
  int N;
  cin >> N;
  set<P> s;
  for(int i = 0; i < N; i++){
    int x, y;
    cin >> x >> y;
    P p;
    p.first = x, p.second = y;
    s.insert(p);
  }

  for (set<P>::iterator i = s.begin(); i != s.end(); ++i) {
    for (set<P>::iterator j = i; j != s.end();) {
      j++;
      if(j == s.end()) continue;
      for (set<P>::iterator k = j; k != s.end();) {
        k++;
        if(k == s.end()) continue;
        int a = (*j).first - (*i).first, b = (*j).second - (*i).second;
        int c = (*k).first - (*i).first, d = (*k).second - (*i).second;
        if(a * d == b * c){
          cout << "Yes" << endl;
          return 0;
        }
      }
    }
  }
  cout << "No" << endl;
  return 0;
}