func main() var y: int :: cui@inputInt() var n: int :: cui@inputInt() var d: int :: cui@inputInt() var days: int :: 365 + (isLeap(y) ?(1, 0)) var min: int :: [n - d, 0].max() var max: int :: [n, [days - d, 1].max()].min() do cui@print("\{min} \{max}\n") func isLeap(year: int): bool ret((year % 4 = 0) & (year % 100 <> 0)) | (year % 400 = 0) end func end func