Once there was a Geek he was quite intelligent and was also fond of jumping. But he jumped in a pattern like 1 leap, 2 leap, 3 leap and again from the start after 3rd leap.
1 leap means if Geek is at point P then he will jump to P+1.
2 leap means if Geek is at point P then he will jump to P+2.
3 leap means if Geek is at point P then he will jump to P+3.
You are his friend and more smarter than him. Before he starts jumping you need to tell whether he could land up to a point D or not.
Note:-He starts from point 0.
First line contains number of test cases denoted by T. The next T lines contains a point D.
Output "yes" without a quotes if your friend can arrive at point D or "no" without a quotes otherwise.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.