var Polje, Pom   : Array[0..102, 0..102] of Word;
    Faktx, FaktY : Array[1..100] of Word;
    Dokle, Xmin, Ymin, N, P, Q, i, j, k, x, y, w, Area, BrFakt : Word;
    c: Char;

Function MozeLi:String;
var i, j : Integer;
Begin
  For k := 1 to BrFakt do
    if (FaktX[k] <= n) and (Fakty[k] <= n)
      then for i := 0 to N-1 do
             for j := 0 to N-1 do
               if (i+FaktX[k] <= n) and (j+FaktY[k] <= n)
                 then if Pom[i+FaktX[k], j+FaktY[k]] + Pom[i, j] =
                         Pom[i, j+FaktY[k]] + Pom[i+FaktX[k], j]
                        then Begin
                               MozeLi := 'yes';
                               exit;
                             end;
  MozeLi := 'no';
end;

begin
  readln(N, Q);
  For w := 1 to Q do
  Begin
    Read(c);
    Case C of
    'g' : Begin
            Read(c);Read(c);Read(c);
            Readln(x, y);
            Polje[x,y] := 1;
          end;
    'c' : Begin
            Read(c);Read(c);
            Readln(x, y);
            Polje[x,y] := 0;
          end;
    'v' : Begin
            Read(c);Read(c);Read(c);
            Readln(Area);

          { rastavljanje na parove do korena }

            j := 0;
            For i := 1 to Trunc(Sqrt(Area)) do
              if (Area mod i = 0)
                then Begin
                       Inc(j);
                       FaktX[j] := i;
                       FaktY[j] := Area div i;
                     end;
          { formiranja parova preko korena }

            For i := 1 to j do
            Begin
              Inc(j);
              FaktX[j] := FaktY[i];
              FaktY[j] := FaktX[i];
            end;
            BrFakt := j;

          { Upisujem koliko drveca ima u pravoug. oblasti
            od donjeg levog ugla do [i,j] (dinamika) }

            For i := 1 to N do
              For j := 1 to N do
                Pom[i,j] := Polje[i,j] + Pom[i-1,j] + Pom[i,j-1] + Polje[i,j] - Pom[i-1,j-1];

          { u funkciji MozeLi, vrsi se provera ima li drveca unutar
            svakog pravougaonika koji staje u matrice }

            Writeln(MozeLi);
          end;
    end;
  end;
end.

