#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): if i_start == i_end and j_start == j_end: return [] if i_start < 0 or i_start >= n or j_start < 0 or i_start >= n: return None if __name__ == "__main__": n = int(input().strip()) i_start, j_start, i_end, j_end = input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] printShortestPath(n, i_start, j_start, i_end, j_end)