/* -*- coding: utf-8 -*- * * 2063.cc: No.2063 ±2^k operations (easy) - yukicoder */ #include #include #include using namespace std; /* constant */ const int MAX_N = 100000; /* typedef */ /* global variables */ char s[MAX_N + 4]; /* subroutines */ /* main */ int main() { scanf("%s", s); int n = strlen(s); int c = 0; for (int i = 0; i < n; i++) c += (s[i] - '0'); if (c <= 2) { if (c == 2) puts("Yes"); else puts("No"); return 0; } int k = 0; while (k < n && s[k] == '1') k++; while (k < n && s[k] == '0') k++; if (k == n) { puts("Yes"); return 0; } puts("No"); return 0; }