def check_true(clauses, i, x):
    """ check if two clauses are satisfied """
    x1 = not x[-clauses[i][0]] if clauses[i][0] < 0 else x[clauses[i][0]]
    x2 = not x[-clauses[i][1]] if clauses[i][1] < 0 else x[clauses[i][1]]
    return x1 or x2