def chakong_haimes(x1, x2):
    """
    Compute the Chakong and Haimes two-objective function to demonstrate a two-objective optimization example.
    The value is computed as defined in https://en.wikipedia.org/wiki/Test_functions_for_optimization
    :param x1: the first input of the function.
    :param x2: the second input of function.
    :return: the two values of the Chakong and Haimes function and the feasibility indicator.
    """
    f1_value = 2 + (x1 - 2)*(x1 - 2) + (x2 - 1)*(x2 - 1)
    f2_value = 9*x1 - (x2 - 1)*(x2 - 1)

    # check constraints
    g1 = x1*x1 + x2*x2 <= 225
    g2 = x1 - 3*x2 + 10 <= 0
    valid = g1 and g2

    return f1_value, f2_value, valid