def bincheck(string) :
t = '01'
#set counter to 0
count = 0
# looping through each character
# of the string .
for char in string :
if char not in t :
count = 1
break
else :
pass
if count :
print("No, the string is not binary.")
else :
print("Yes, the string is binary.")
string = input("Enter string: ")
# function calling
bincheck(string)