def point_in_polygon(point, polygon):
    """
    Checks if a point is inside a polygon.

    :param point: point
    :param polygon: polygon
    :return: point is inside polygon
    """
    px, py = point

    size = len(polygon)
    for i in range(size):
        p1x, p1y = polygon[i]
        p2x, p2y = polygon[(i + 1) % size]
        if min(p1x, p2x) < px <= max(p1x, p2x):
            p = p1y - p2y
            q = p1x - p2x
            y = (px - p1x) * p / q + p1y
            if y < py:
                return True

    return False