import math


def dot(p0, p1, p2, p3) -> float:
    """Calculare cosinue of angle between vectors p0->p1 and p2->p3"""
    v0 = (p1[0] - p0[0], p1[1] - p0[1])
    v1 = (p3[0] - p2[0], p3[1] - p2[1])

    return (v0[0] * v1[0] + v0[1] * v1[1]) / (math.hypot(*v0) * math.hypot(*v1))