def evaluate(h,x):
    """evaluate an instance x with an hypothesis h, that is
    a function X->{Yes,No}"""
    for i,feature in enumerate(h):
        if feature=="0":
            return "No"
        if feature!="?" and feature!=x[i]:
            return "No"
    return "Yes"