def vertex_sup_dret(x, y, costat):
    return x + costat, y + costat

def dimensions(x_inf,y_inf,x_sup,y_sup):
    amplada = x_sup - x_inf
    alcada = y_sup - y_inf
    return amplada,alcada

def punt_interior(x_inf,y_inf,costat,x_punt,y_punt):
    x_sup,y_sup = vertex_sup_dret(x_inf,y_inf,costat)
    return x_inf<=x_punt<=x_sup and y_inf<=y_punt<=y_sup
        
