import random


def generate_plane(plane_size, num_pts):
    """
    Function to generate random points.

    Args:
        plane_size: Size of plane (X_max, Y_max)
        num_pts: Number of points to generate

    Returns:
        List of random points: [(p1_x, p1_y), (p2_x, p2_y), ...]
    """

    gen = random.sample(range(plane_size[0] * plane_size[1]), num_pts)
    random_points = [(i % plane_size[0] + 1, i // plane_size[1] + 1) for i in gen]

    return random_points