ПЯТАЯ!!!
var a:array[1..100,1..100]of integer;
b:array[1..100]of boolean;
i,f,f1,f2,j,n,m,s,l,k,g:integer;
begin
readln(n,m);
for i:=1 to n do
for j:=1 to m do
readln(a[i,j]);
for i:=1 to n do
begin
k:=0;
for j:=1 to m do
begin
g:=i+j;
f:=1;
f1:=1;
while f<g do
begin
f2:=f1;
f1:=f;
f:=f1+f2;
end;
if (g=f)and(a[i,j]mod 7=0) then k:=k+1;
end;
b[i]:=k mod 2=0;
end;
for i:=1 to n do
writeln(b[i]);
readln;
end.