1. You are given a string(str) consisting of only 0's and 1's, and a number N. 2. You have to find if the binary representation of every number from 1 to N can be represented by a substring of the given string.
Input Format
A string consisting of only 0's and 1's A number
Output Format
true/false
Constraints
1 <= length of string <= 1000 1 <= N <= 10^9
Example
Input
0110 3
Output
true