function p(y)
p = (y + int(y/4) - int(y/100) + int(y/400)) mod 7
end function
function isLongYear(y)
isLongYear = (p(y) = 4) or (p(y -1) = 3)
for y = 2000 to 2100
if isLongYear(y) then print y
next y
end