import std; void main () { int N = readln.chomp.to!int; int[] P = new int[](N); foreach (i; 0..N) { switch (readln.chomp) { case ("Yes"): P[i] = 1; continue; case ("No"): P[i] = 0; continue; default: enforce(0, "invalid input"); } } int sum = 0; foreach (i; 0..N) { if (i == 0) { if (P[i] == 1) writeln("Yes"); if (P[i] == 0) writeln("No"); sum += P[i]; continue; } sum += P[i]; if (sum == i+1 || sum == 0) { writeln("Yes"); } else { writeln("No"); } } } void read(T...)(string S, ref T args) { auto buf = S.split; foreach (i, ref arg; args) { arg = buf[i].to!(typeof(arg)); } }