#Lutece1027. One step,two steps

One step,two steps

Migrated from Lutece 1027 One step,two steps

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

As we all know,the handsome boy, Zcat, has a fever of flat shoes. He sings it on the class, in the dormitory and the way he come back from the machinery room to his dorm.One day , he sing it on the way, just like

  "MY skating shoes are the most fashion one 
  At the way back to home I couldn't stop 
  rubbing rubbing
  rubbing at such smooth floor
  With the moonlight ,I was able to see my shadow was either very close or far 
  I felt that my step was forced by a kind of strength
  With the skating shoes ,I will not afraid anything around the world 
  One step two steps,every one was just like zhuaya
  The motion which was like a ghost was rubbing and rubbing 
  I beat to beat for myself
  It's the best moment of my life
  I'd got to finish my favorite dancing
  At the terrfic street where moonlight fall
  I told myself that it really wasn't dream
  One step two steps ,every one was just like zhuaya 
  The gost step was rubbing and rubbing
  rubbing at such smooth floor
  The motion which was like a ghost was rubbing and rubbing 
  One step two steps,every one was just like zhuaya 
  One step two steps,every one was just like zhuaya
        ⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯“

On he sings this,he sees a pretty girl standing on by the roadside. Zcat wants to see the pretty girl's face. Zcat knows the distance between he and her is n(1n1000000)n(1 \leq n \leq 1000000) meters. Zcat also wants to see the girl's face clearly. So he must move forward exactly nn meters.To show the girl his favourite dancing,he has to follow the lyric One step two stepsof flat shoes. When the lyric is one step, he will move exactly 11 meter. When the lyric is two steps, he will move exactly 22 meters. Now, Zcat knows the whole lyric. He wants to know is there a time he can start, then move forward following the lyric, and he will see the pretty girl clearly.

Input

The first line contains a single number n(1n1000000)n(1 \leq n \leq 1000000) denotes the length of the lyric of One step and Two steps.

The second line contains nn numbers.Anyone of these is 11 or 22.

The third line contains a single number q(1q3000000)q(1 \leq q \leq 3000000) denotes the time of question.

The next line contains qq numbers denote then distance between Zcat and the pretty girl.

Output

To every question, if Zcat can see the girl clearly, print Yes, else print No.

Samples

8
2 1 1 1 1 2 2 2
6
1 3 5 7 9 11
Yes
Yes
Yes
Yes
Yes
No

Resources

MaxKU