#include using namespace std; #define int long long signed main(){ //1.入力の受け取り. bool ans = true; int N,M; cin>>N>>M; vector A(M); set B; //3.の存在判定のときに使用 for(int i = 0; i < M; i++){ string S; cin>>S; int now = 0; for(int j = 0; j < N; j++){ now += (S[N-j-1] - '0') * (1< cnt(1<= 2) ans = false; //5.出力 if(ans) cout << "Yes" << "\n"; else cout << "No" << "\n"; }