import java.util.*; public class Main { private static final int[][] directions = {{1, 2}, {1, -2}, {-1, 2}, {-1, -2}, {2, 1}, {2, -1}, {-2, 1}, {-2, -1}}; private static Set<Integer> set = new HashSet<>(); private static List<List<Integer>> ans = new LinkedList<>(); pu...