# RunningMan FZU - 2221 (思维！！)

## RunningMan

ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100.

There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to fight. In each round, whichever team sends more people wins, and if the two teams send the same amount of people, RunningMan team wins. Each person can be sent out to only one round. The team wins 2 rounds win the whole game. Note, the arrangement of the fighter in three rounds must be decided before the whole game starts.

We know that there are N people on the RunningMan team, and that there are M people on the opposite team. Now zb wants to know whether there exists an arrangement of people for the RunningMan team so that they can always win, no matter how the opposite team arrange their people.

Input

The first line contains an integer T, meaning the number of the cases. 1 <= T <= 50.

For each test case, there's one line consists of two integers N and M. (1 <= N, M <= 10^9).

Output

For each test case, Output "Yes" if there exists an arrangement of people so that the RunningMan team can always win. "No" if there isn't such an arrangement. (Without the quotation marks.)

Sample Input
2
100 100
200 100
Sample Output
No
Yes

Hint

In the second example, the RunningMan team can arrange 60, 60, 80 people for the three rounds. No matter how the opposite team arrange their 100 people, they cannot win.

【题意】

①每轮比赛中,人数较多的一方获胜,人数相同时算RunningMan这队获胜

②参赛的每个人最多只能参加一轮比赛

③比赛采取三局两胜制,即赢了两轮比赛的队伍获胜

④三轮比赛的人数安排必须在总的比赛开始前给出,且不能更换

⑤显然,比赛开始前,每一队都不知道对方的人数安排情况

【类型】

【分析】

⒈当m为偶数时,因为RunningMan队是平均分配人数的,所以对手方两轮人数分别为k,k(m=k+k,就算不是k,k也不要紧,后面接着分析)

⒉当m为奇数时,对手方人数安排为k,k-1(m=k+k-1)

code：

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
int t,n,m;
scanf("%d",&t);
while(t--){
scanf("%d%d",&n,&m);
if(m % 2 == 1 && n >= m / 2 * 3 || m % 2 == 0 && n >= m / 2 * 3 - 1)
puts("Yes");
else
puts("No");
}
return 0;
}