def next_Perfect_Square(N):
    import math
    root = math.isqrt(N)
    next_root = root + 1
    return next_root * next_root