Check if a given point (x, y) lies on the curve
bool containsPoint(BigInt x, BigInt y) { BigInt leftSide = (a * x * x + y * y - BigInt.one - d * x * x * y * y) % p; return leftSide == BigInt.zero; }