Vova plays a computer game known as Mages and Monsters. Vova's character is a mage. Though as he has just started, his character knows no spells.

Vova's character can learn new spells during the game. Every spell is characterized by two values *x*<sub class="lower-index">*i*</sub> and *y*<sub class="lower-index">*i*</sub> — damage per second and mana cost per second, respectively. Vova doesn't have to use a spell for an integer amount of seconds. More formally, if he uses a spell with damage *x* and mana cost *y* for *z* seconds, then he will deal *x*·*z* damage and spend *y*·*z* mana (no rounding). If there is no mana left (mana amount is set in the start of the game and it remains the same at the beginning of every fight), then character won't be able to use any spells. It is prohibited to use multiple spells simultaneously.

Also Vova can fight monsters. Every monster is characterized by two values *t*<sub class="lower-index">*j*</sub> and *h*<sub class="lower-index">*j*</sub> — monster kills Vova's character in *t*<sub class="lower-index">*j*</sub> seconds and has *h*<sub class="lower-index">*j*</sub> health points. Mana refills after every fight (or Vova's character revives with full mana reserve), so previous fights have no influence on further ones.

Vova's character kills a monster, if he deals *h*<sub class="lower-index">*j*</sub> damage to it in no more than *t*<sub class="lower-index">*j*</sub> seconds using his spells (it is allowed to use more than one spell in a fight) and spending no more mana than he had at the beginning of the fight. If monster's health becomes zero exactly in *t*<sub class="lower-index">*j*</sub> seconds (it means that the monster and Vova's character kill each other at the same time), then Vova wins the fight.

You have to write a program which can answer two types of queries:
 -  1 *x* *y* — Vova's character learns new spell which deals *x* damage per second and costs *y* mana per second. -  2 *t* *h* — Vova fights the monster which kills his character in *t* seconds and has *h* health points. 
Note that queries are given in a different form. Also remember that Vova's character knows no spells at the beginning of the game.

For every query of second type you have to determine if Vova is able to win the fight with corresponding monster.
The first line contains two integer numbers *q* and *m* (2 ≤ *q* ≤ 10<sup class="upper-index">5</sup>, 1 ≤ *m* ≤ 10<sup class="upper-index">12</sup>) — the number of queries and the amount of mana at the beginning of every fight.

*i*-th of each next *q* lines contains three numbers *k*<sub class="lower-index">*i*</sub>, *a*<sub class="lower-index">*i*</sub> and *b*<sub class="lower-index">*i*</sub> (1 ≤ *k*<sub class="lower-index">*i*</sub> ≤ 2, 1 ≤ *a*<sub class="lower-index">*i*</sub>, *b*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">6</sup>). 

Using them you can restore queries this way: let *j* be the index of the last query of second type with positive answer (*j* = 0 if there were none of these). 
 -  If *k*<sub class="lower-index">*i*</sub> = 1, then character learns spell with *x* = (*a*<sub class="lower-index">*i*</sub> + *j*) *mod* 10<sup class="upper-index">6</sup> + 1, *y* = (*b*<sub class="lower-index">*i*</sub> + *j*) *mod* 10<sup class="upper-index">6</sup> + 1. -  If *k*<sub class="lower-index">*i*</sub> = 2, then you have to determine if Vova is able to win the fight against monster with *t* = (*a*<sub class="lower-index">*i*</sub> + *j*) *mod* 10<sup class="upper-index">6</sup> + 1, *h* = (*b*<sub class="lower-index">*i*</sub> + *j*) *mod* 10<sup class="upper-index">6</sup> + 1.
In first example Vova's character at first learns the spell with 5 damage and 10 mana cost per second. Next query is a fight with monster which can kill character in 20 seconds and has 50 health points. Vova kills it in 10 seconds (spending 100 mana). Next monster has 52 health, so Vova can't deal that much damage with only 100 mana.
3 100
1 4 9
2 19 49
2 19 49
YES
NO
10 442006988299
2 10 47
1 9 83
1 15 24
2 19 47
2 75 99
2 85 23
2 8 33
2 9 82
1 86 49
2 71 49
NO
YES
YES
YES
YES
YES
YES
2 424978864039
2 7 3
2 10 8
NO
NO
3 10
1 1 1
2 1 1
2 999999 999999
YES
YES
12 100
1 8 8
2 200 101
2 10 99
1 9 9
2 10 99
2 200 101
1 14 4
2 194 195
2 194 194
2 990 290
2 999991 11
2 999991 10
NO
NO
YES
NO
NO
YES
NO
NO
YES
15 100
1 8 8
2 200 101
2 10 99
1 9 9
2 10 99
2 200 101
1 14 4
2 194 195
2 194 194
2 990 290
1 2 999992
2 6 256
2 7 256
1 2 999988
2 2 252
NO
NO
YES
NO
NO
YES
NO
NO
YES
YES
3 12
1 99 9
1 49 1
2 1 149
YES
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#        AMALLAR
#x=3 # x uchga teng
#    CHOP ETISH
#print u"Hello, worl!"
#print 'Python dasturlash tili' " Ismingiz nima?"
#     SATRLAR
#"'Bu ko’p qatorlik satr. Bu uning birinchi qatori.Hello'"
#      FORMAT METODI
#print('{0}ning yoshi - {1} da.'.format('Swaroop',26))
#print('Nima uchun {0} Pythonga qiziqadi?'.format('Swaroop'))
print'{name}ning yozgan kitobi {lang} dasturlash tili xaqida'.format(name='Swaroop', lang='Python')
print'{0:f^11}'.format('hello')
