Problem link please find out why this code is not printing 2 for test case ie

Input: 2 1 10 3 5 Output: 2 3 5 7 3 5

here is code…

```
**program PRIME1;
uses Math;**
<var>
var
T:integer;
N,M:longint;
i,y,pos:longint;
</var>
begin
read(T);
while T <> 0 do
begin
readln(M,N);
for i := M to N do
begin
pos := ceil(sqrt(i));
for y := 2 to pos do
begin
if i mod y = 0 then break
else continue;
end;
if (i mod y <> 0) and (i > 1) then
writeln(i);
end;
writeln;
T := T-1;
end;
end.
```