program chocolate;
var
n, m, k, i: Integer;
b: Boolean;
begin
Write ('Введите n, m, k: ');
ReadLn (n, m, k);
b := False;
for i := 1 to n do
if i * m = k then begin
b := True;
Break;
end;
if not b then begin
for i := 1 to m do
if i * n = k then begin
if b then
WriteLn ('YES')
else
WriteLn ('NO');
ReadLn;
program chocolate;
var
n, m, k, i: Integer;
b: Boolean;
begin
Write ('Введите n, m, k: ');
ReadLn (n, m, k);
b := False;
for i := 1 to n do
if i * m = k then begin
b := True;
Break;
end;
if not b then begin
for i := 1 to m do
if i * n = k then begin
b := True;
Break;
end;
end;
if b then
WriteLn ('YES')
else
WriteLn ('NO');
ReadLn;