import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int absX = Math.abs(i_start-i_end); int absY = Math.abs(j_start-j_end); int x = i_start; int y = j_start; int temp = i_end; i_end= j_end; j_end = temp; int count =0; String result = ""; //if absX||absY decreases choose the move while((x>-1 && x-1 && yn-1){ return false; } if(y<0 || y>n-1){ return false; } return true; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int i_start = in.nextInt(); int j_start = in.nextInt(); int i_end = in.nextInt(); int j_end = in.nextInt(); printShortestPath(n, i_start, j_start, i_end, j_end); in.close(); } }