<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def intersect(a, b):
 """ Check if two rectangles intersect """

    if a[x0] == a[x1] or a[y0] == a[y1]:
        return False
    if b[x0] == b[x1] or b[y0] == b[y1]:
        return False
    return a[x0] <= b[x1] and b[x0] <= a[x1] and a[y0] <= b[y1] and b[y0] <= a[y1]