#include <stdio.h>
#include <string.h>
#include <stdbool.h>
bool isBinary(const char* str) {
if (!*str) {
return false;
}
return str[strspn(str, "01")] == '\0';
}
int main(void) {
char s1[] = "0110001110111";
puts(isBinary(s1) ? "yes" : "no");
char s2[] = "011011189100";
puts(isBinary(s2) ? "yes" : "no");
return 0;
}
/*
run:
yes
no
*/