import java.util.Scanner; public class Knight { /* Dimension of the board */ private static int n; /* Number of moves allowed */ private static int m; /* Position of the knight on the board */ private static int kX, kY; /* Position of the Queen on the board */ private static int qX, qY; /* Offsets for 8 possible moves of the knight */ private static byte[][] dirs = { {1,-2}, {2,-1}, {2,1}, {1,2}, {-1,2}, {-2,1}, {-2,-1}, {-1,-2} }; /* * Checks whether the Queen is reachable by the * Knight within m moves. */ private static boolean reachable() { /* ------------------- INSERT CODE HERE ---------------------*/ /* -------------------- END OF INSERTION --------------------*/ return false; } public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); n = sc.nextInt(); m = sc.nextInt(); kX = sc.nextInt(); kY = sc.nextInt(); qX = sc.nextInt(); qY = sc.nextInt(); if (reachable()) { System.out.println("Knight can reach Queen within " + m + " moves!"); } else { System.out.println("Knight cannot reach Queen within " + m + " moves!"); } } }