--------
int n; int f[maxn]; char s[maxn]; int main(){ int n=0; while (gets(s+n)){ n=strlen(s); } s[n]=0; f[0]=0; for (int i=1;i<=n;i++) f[i]=(f[i-1]+1999)%i; if (s[f[n]]=='?') printf("Yes "); else if (s[f[n]]==' ') printf("No "); else printf("No comments "); return 0; }
--------