#include <bits/stdc++.h>
using namespace std;

int main() {
	int t; scanf("%d", &t);
	while (t--) {
		int l, r; scanf("%d%d", &l, &r);
		printf("%lld\n", r < l << 1 ? 0 : 1ll * (r - (l << 1) + 1) * (r - (l << 1) + 2) >> 1);
	}
	return 0;
}


#include <bits/stdc++.h>
#define repp(i, l, r) for (long long i = (l); i < (r); i++)
#define rep(i, n) for (long long i = 0; i < (n); ++i)
#define per(i, n) for (long long i = (n); i >= 0; --i)
#define all(v) v.begin(), v.end()
const int INF = 1 << 30;
const long long LINF = 1LL << 60;
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
using PLI = pair<long long, int>;
template <class T>
inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
//ミョ(-ω- ?)
int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    ll n;
    cin >> n;
    vector<pair<long double, long double>> a(n);
    rep(i, n) { cin >> a[i].first >> a[i].second; }

    for (ll i = 0; i < n; i++) {
        for (ll j = i + 1; j < n; j++) {
            for (ll k = j + 1; k < n; k++) {
                ll x1 = (a[i].first - a[j].first);
                ll x2 = (a[j].first - a[k].first);
                ll y1 = (a[i].second - a[j].second);
                ll y2 = (a[j].second - a[k].second);
                if(x2 * y1 == x1 * y2){
                    cout << "Yes\n";
                    cerr << i << j << k << "\n";
                    return 0;
                }
            }
        }
    }
    cout << "No\n";
    return 0;
}