A long journey ends at the hall of the Wizard of Odds, who promises to grant any wish if you solve one puzzle.
The wizard first tells you two integers N and K. He then secretly picks an integer from 1 to N inclusive and keeps it to himself.
Your goal is to name that secret number correctly. Before naming it you may ask K questions that the wizard answers with true or false, for example "is the number even", "is the number between 7 and 10", "is the number 17 or 22", or "is the number prime". The wizard always answers honestly. Once all K answers are in you must name one number. Name it correctly and your wish is granted. Name it wrongly and you become a flying monkey.
Formally, a question is a function from {1,2,…,N} to the two values true and false, and the wizard tells you the value of that function at his secret number. You may choose each question after seeing the answers to the earlier ones.
Given N and K, decide whether K questions always pin down the secret number, no matter which number the wizard picked.