import math


def find_pythag_triplet_optimized(s=1000):
    """
    Find the Pythagorean triplet (a, b, c) that satisfies a + b + c = s

    :param s: a + b + c
    :return: (a * b * c, (a, b, c))
    """
    s2 = s // 2
    lim = math.ceil(math.sqrt(s2)) - 1
    for m in range(2, lim + 1):
        if s2 % m == 0:
            s_m = s2 // m
            while s_m % 2 == 0:
                s_m //= 2
            k = m + 1
            if m % 2 == 1:
                k = m + 2
            while k < 2 * m and k <= s_m:
                if s_m % k == 0 and math.gcd(k, m) == 1:
                    d = s2 // (k * m)
                    n = k - m
                    a = d * (m ** 2 - n ** 2)
                    b = 2 * d * m * n
                    c = d * (m ** 2 + n ** 2)
                    return a * b * c, (a, b, c)
                k += 2
    return None