Program n1;
var n,m,i,j: integer;
f: byte;
begin
readln(n);
readln(m);
f:=0;
for i:=m-1 downto 1 do begin
for j:=i-1 downto 1 do if(i*i*i-j*j*j=n) then begin
write('YES');
f:=1;
break;
end;
if (f=1) then break;
if (f=0) then write('NO');
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Program n1;
var n,m,i,j: integer;
f: byte;
begin
readln(n);
readln(m);
f:=0;
for i:=m-1 downto 1 do begin
for j:=i-1 downto 1 do if(i*i*i-j*j*j=n) then begin
write('YES');
f:=1;
break;
end;
if (f=1) then break;
end;
if (f=0) then write('NO');
end.