АВТ
Язык:

Дистанционный практикум по программированию

Задачи Online статус Соревнования
Новости Справка СДО
 
Здравствуйте, Гость! Войдите с паролем или зарегистрируйтесь.

1592. Parquet

Ограничение времени: 0.5 сек.
Ограничение памяти:262144 КБайт
Баллы:100
Статистика Послать на проверку Задачу добавил debug

During the redecoration of the H&H office the decision was made to lay a parquet floor. The floor has a form of N × M rectangle. Each parquet hoard is a 2 × 3 rectangle.

Help H&H maintenance departement to determine if it is possible to lay the parquet with available hoards or not. The parquet hoards cannot be breaked.

Входные данные

The first line of the input contains the number of test cases K (1 ≤ K ≤ 10). Each of the following K lines contains two integer numbers — N and M (1 ≤ N, M ≤ 109).

Выходные данные

For each test case from the input write to the output separate string with word "Yes" if the answer is positive or word "No" in the opposite case.

Пример

Входные данные
3
3 2
5 12
7 8
Выходные данные
Yes
Yes
No


Статистика Послать на проверку Обсуждение задачи Автор/источник:
Задачи с соревнований и сборов / Сборы в Перми 2009 / 07.07.09 Большой контест /
1591. J - Selection 1592.
 
время генерации 1.156 сек.
© Copyright ВоГУ, АВТ, Носов Д.А., Андрианов И.А.