method returns " yes " if u is a ancestor node of v
def isAncestor ( u : int , v : int , timeIn : list , timeOut : list ) -> str : NEW_LINE INDENT b = timeIn [ u ] <= timeIn [ u ] and timeOut [ v ] <= timeOut [ u ] NEW_LINE return " yes " if b else " no " NEW_LINE DEDENT