Description

Line Rasterization

Implement a hardware line drawing module that takes two distinct points with integer coordinates (x0, y0) and (x1, y1) and outputs the sequence of pixel coordinates that represent the straight line segment connecting these points.

Example: For points (0, 0) and (3, 3), output the pixel sequence: (0, 0), (1, 1), (2, 2), (3, 3).

Source: Original problem (inspired by Bresenham's line algorithm)

Input

p0

8-bit Signed Integer Pair
Line start point (x0, y0).

p1

8-bit Signed Integer Pair
Line end point (x1, y1).

Output

Stream of 8-bit Signed Integer Pair
Pixel coordinates forming the line.