codeforces/793B_way.py
def calculate(self):
        """ Main calcualtion function of the class """

        result = "NO"

        for x in self.linkedx:
            if self.is_linked((x, self.start[1]), (x, self.end[1])):
                result = "YES"
                break
        for y in self.linkedy:
            if self.is_linked((self.start[0], y), (self.end[0], y)):
                result = "YES"
                break

        return str(result)
 Main calcualtion function of the class 
Main calcualtion function of the class
Main calcualtion function of the class
def calculate(self):
        result = "NO"
        for x in self.linkedx:
            if self.is_linked((x, self.start[1]), (x, self.end[1])):
                result = "YES"
                break
        for y in self.linkedy:
            if self.is_linked((self.start[0], y), (self.end[0], y)):
                result = "YES"
                break
        return str(result)
def calculate ( self ) : result = "NO" for x in self . linkedx : if self . is_linked ( ( x , self . start [ 1 ] ) , ( x , self . end [ 1 ] ) ) : result = "YES" break for y in self . linkedy : if self . is_linked ( ( self . start [ 0 ] , y ) , ( self . end [ 0 ] , y ) ) : result = "YES" break return str ( result )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self