def is_pythagorean_triple(p: tuple[int, int, int]) -> bool:
    """Return whether p is a Pythagorean triple.

    Preconditions:
        - all(n > 0 for n in p)

    >>> is_pythagorean_triple((3, 4, 5))
    True
    >>> is_pythagorean_triple((1, 1, 2))
    False
    """
    a, b, c = p
    return (c ** 2) == a ** 2 + b ** 2