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

struct FastIO {FastIO() { cin.tie(0); ios::sync_with_stdio(0); }}fastiofastio;
int main()
{
	int n, m, t; cin >> n >> m >> t;
	int latest = 0;
	int a, b;
	int now_battery = n;
	while (m--)
	{
		cin >> a >> b;
		now_battery -= a - latest;
		if (now_battery <= 0)
			break ;
		now_battery = min(n, now_battery + b - a);
		latest = b;
	}
	now_battery -= t - latest;
	if (now_battery <= 0)
		cout << "No";
	else
		cout << "Yes";
	cout << endl;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (ll i = s; i < e; i++)
#define rrep(i, s, e) for (ll i = s; i > e; i--)

int main() {
  ll t;
  cin >> t;
  rep(i, 0, t) {
    ll l, r;
    cin >> l >> r;
    if (2 * l > r) cout << 0 << endl;
    else cout << ((r - 2 * l + 2) * (r - 2 * l + 1)) / 2 << endl;
  }
}
