HackerRank Almost Integer Rock Garden Solution Yashwant Parihar, May 13, 2023May 13, 2023 In this post, we will solve HackerRank Almost Integer Rock Garden Problem Solution Victor is building a Japanese rock garden in his 24 x 24 square courtyard. He overlaid the courtyard with a Cartesian coordinate system so that any point (x, y) in the courtyard has coordinates a Є [-12, 12] and y € [-12, 12]. Victor wants to place 12 stones in the garden according to the following rules: The center of each stone is located at some point (x, y), where x and y are integers € [-12, 12]. The coordinates of all twelve stones are pairwise distinct. The Euclidean distance from the center of any stone to the origin is not an integer. The sum of Euclidean distances between all twelve points and the origin is an almost integer, meaning the absolute difference between this sum and an integer must be ≤10 power -12 Given the values of x and y for the first stone Victor placed in the garden, place the remaining 11 stones according to the requirements above. For each stone you place, print two space- separated integers on a new line describing the respective x and y coordinates of the stone’s location. Input Format Two space-separated integers describing the respective values of x and y for the first stone’s location. Output Format Print 11 lines, where each line contains two space-separated integers describing the respective values of x and y for a stone’s lo Sample Input 0 7 11 Sample Output 0 11 1 -2 12 5 4 12 -3 10 3 9 6 -12 -7 1 11 -6 -6 12 -4 4 12 HackerRank Almost Integer Rock Garden Problem Solution Almost Integer Rock Garden C Solution #include <stdio.h> #include <math.h> int p[][12][16][2]={ {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-4}, {-12,4}, {-4,-12}, {-4,12}, {4,-12}, {4,12}, {12,-4}, {12,4}, },{{-12,-4}, {-12,4}, {-4,-12}, {-4,12}, {4,-12}, {4,12}, {12,-4}, {12,4}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-10,-3}, {-10,3}, {-3,-10}, {-3,10}, {3,-10}, {3,10}, {10,-3}, {10,3}, },{{-9,-6}, {-9,6}, {-6,-9}, {-6,9}, {6,-9}, {6,9}, {9,-6}, {9,6}, },{{-12,-3}, {-12,3}, {-3,-12}, {-3,12}, {3,-12}, {3,12}, {12,-3}, {12,3}, },{{-12,-2}, {-12,2}, {-2,-12}, {-2,12}, {2,-12}, {2,12}, {12,-2}, {12,2}, },{{-11,-7}, {-11,7}, {-7,-11}, {-7,11}, {7,-11}, {7,11}, {11,-7}, {11,7}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, },{{-5,-4}, {-5,4}, {-4,-5}, {-4,5}, {4,-5}, {4,5}, {5,-4}, {5,4}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-7,-7}, {-7,7}, {7,-7}, {7,7}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-6,-2}, {-6,2}, {-2,-6}, {-2,6}, {2,-6}, {2,6}, {6,-2}, {6,2}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-3,-1}, {-3,1}, {-1,-3}, {-1,3}, {1,-3}, {1,3}, {3,-1}, {3,1}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-7}, {-7,7}, {7,-7}, {7,7}, },{{-2,-1}, {-2,1}, {-1,-2}, {-1,2}, {1,-2}, {1,2}, {2,-1}, {2,1}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-8,-4}, {-8,4}, {-4,-8}, {-4,8}, {4,-8}, {4,8}, {8,-4}, {8,4}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-1,-1}, {-1,1}, {1,-1}, {1,1}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-7,-1}, {-7,1}, {-5,-5}, {-5,5}, {-1,-7}, {-1,7}, {1,-7}, {1,7}, {5,-5}, {5,5}, {7,-1}, {7,1}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-2,-2}, {-2,2}, {2,-2}, {2,2}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-4,-2}, {-4,2}, {-2,-4}, {-2,4}, {2,-4}, {2,4}, {4,-2}, {4,2}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-7,-7}, {-7,7}, {7,-7}, {7,7}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-4,-4}, {-4,4}, {4,-4}, {4,4}, },{{-3,-3}, {-3,3}, {3,-3}, {3,3}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, }}, {{{-12,-11}, {-12,11}, {-11,-12}, {-11,12}, {11,-12}, {11,12}, {12,-11}, {12,11}, },{{-12,-11}, {-12,11}, {-11,-12}, {-11,12}, {11,-12}, {11,12}, {12,-11}, {12,11}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-2,-1}, {-2,1}, {-1,-2}, {-1,2}, {1,-2}, {1,2}, {2,-1}, {2,1}, },{{-12,-1}, {-12,1}, {-9,-8}, {-9,8}, {-8,-9}, {-8,9}, {-1,-12}, {-1,12}, {1,-12}, {1,12}, {8,-9}, {8,9}, {9,-8}, {9,8}, {12,-1}, {12,1}, },{{-11,-9}, {-11,9}, {-9,-11}, {-9,11}, {9,-11}, {9,11}, {11,-9}, {11,9}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-9,-2}, {-9,2}, {-7,-6}, {-7,6}, {-6,-7}, {-6,7}, {-2,-9}, {-2,9}, {2,-9}, {2,9}, {6,-7}, {6,7}, {7,-6}, {7,6}, {9,-2}, {9,2}, },{{-9,-1}, {-9,1}, {-1,-9}, {-1,9}, {1,-9}, {1,9}, {9,-1}, {9,1}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, }}, {{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-7}, {-10,7}, {-7,-10}, {-7,10}, {7,-10}, {7,10}, {10,-7}, {10,7}, },{{-9,-6}, {-9,6}, {-6,-9}, {-6,9}, {6,-9}, {6,9}, {9,-6}, {9,6}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-6,-5}, {-6,5}, {-5,-6}, {-5,6}, {5,-6}, {5,6}, {6,-5}, {6,5}, }}, {{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-11}, {-12,11}, {-11,-12}, {-11,12}, {11,-12}, {11,12}, {12,-11}, {12,11}, },{{-11,-7}, {-11,7}, {-7,-11}, {-7,11}, {7,-11}, {7,11}, {11,-7}, {11,7}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-9,-2}, {-9,2}, {-7,-6}, {-7,6}, {-6,-7}, {-6,7}, {-2,-9}, {-2,9}, {2,-9}, {2,9}, {6,-7}, {6,7}, {7,-6}, {7,6}, {9,-2}, {9,2}, },{{-9,-2}, {-9,2}, {-7,-6}, {-7,6}, {-6,-7}, {-6,7}, {-2,-9}, {-2,9}, {2,-9}, {2,9}, {6,-7}, {6,7}, {7,-6}, {7,6}, {9,-2}, {9,2}, }}, {{{-12,-1}, {-12,1}, {-9,-8}, {-9,8}, {-8,-9}, {-8,9}, {-1,-12}, {-1,12}, {1,-12}, {1,12}, {8,-9}, {8,9}, {9,-8}, {9,8}, {12,-1}, {12,1}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-2}, {-8,2}, {-2,-8}, {-2,8}, {2,-8}, {2,8}, {8,-2}, {8,2}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-1}, {-7,1}, {-5,-5}, {-5,5}, {-1,-7}, {-1,7}, {1,-7}, {1,7}, {5,-5}, {5,5}, {7,-1}, {7,1}, },{{-4,-1}, {-4,1}, {-1,-4}, {-1,4}, {1,-4}, {1,4}, {4,-1}, {4,1}, }}, {{{-12,-2}, {-12,2}, {-2,-12}, {-2,12}, {2,-12}, {2,12}, {12,-2}, {12,2}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-10,-4}, {-10,4}, {-4,-10}, {-4,10}, {4,-10}, {4,10}, {10,-4}, {10,4}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, },{{-4,-4}, {-4,4}, {4,-4}, {4,4}, },{{-12,-8}, {-12,8}, {-8,-12}, {-8,12}, {8,-12}, {8,12}, {12,-8}, {12,8}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-8,-3}, {-8,3}, {-3,-8}, {-3,8}, {3,-8}, {3,8}, {8,-3}, {8,3}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, }}, {{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-8,-2}, {-8,2}, {-2,-8}, {-2,8}, {2,-8}, {2,8}, {8,-2}, {8,2}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-3,-1}, {-3,1}, {-1,-3}, {-1,3}, {1,-3}, {1,3}, {3,-1}, {3,1}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-8,-8}, {-8,8}, {8,-8}, {8,8}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, },{{-5,-3}, {-5,3}, {-3,-5}, {-3,5}, {3,-5}, {3,5}, {5,-3}, {5,3}, }}, {{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-9,-9}, {-9,9}, {9,-9}, {9,9}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, },{{-1,-1}, {-1,1}, {1,-1}, {1,1}, }}, {{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, },{{-4,-2}, {-4,2}, {-2,-4}, {-2,4}, {2,-4}, {2,4}, {4,-2}, {4,2}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-10}, {-10,10}, {10,-10}, {10,10}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, }}, {{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-10}, {-10,10}, {10,-10}, {10,10}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, }}, {{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-4}, {-12,4}, {-4,-12}, {-4,12}, {4,-12}, {4,12}, {12,-4}, {12,4}, },{{-12,-2}, {-12,2}, {-2,-12}, {-2,12}, {2,-12}, {2,12}, {12,-2}, {12,2}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, }}, {{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-1}, {-9,1}, {-1,-9}, {-1,9}, {1,-9}, {1,9}, {9,-1}, {9,1}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-12,-3}, {-12,3}, {-3,-12}, {-3,12}, {3,-12}, {3,12}, {12,-3}, {12,3}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-7,-2}, {-7,2}, {-2,-7}, {-2,7}, {2,-7}, {2,7}, {7,-2}, {7,2}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, },{{-4,-2}, {-4,2}, {-2,-4}, {-2,4}, {2,-4}, {2,4}, {4,-2}, {4,2}, }}, {{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-1}, {-12,1}, {-9,-8}, {-9,8}, {-8,-9}, {-8,9}, {-1,-12}, {-1,12}, {1,-12}, {1,12}, {8,-9}, {8,9}, {9,-8}, {9,8}, {12,-1}, {12,1}, },{{-11,-8}, {-11,8}, {-8,-11}, {-8,11}, {8,-11}, {8,11}, {11,-8}, {11,8}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-8,-2}, {-8,2}, {-2,-8}, {-2,8}, {2,-8}, {2,8}, {8,-2}, {8,2}, },{{-7,-2}, {-7,2}, {-2,-7}, {-2,7}, {2,-7}, {2,7}, {7,-2}, {7,2}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-11,-6}, {-11,6}, {-6,-11}, {-6,11}, {6,-11}, {6,11}, {11,-6}, {11,6}, },{{-9,-9}, {-9,9}, {9,-9}, {9,9}, },{{-8,-4}, {-8,4}, {-4,-8}, {-4,8}, {4,-8}, {4,8}, {8,-4}, {8,4}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, }}, {{{-12,-8}, {-12,8}, {-8,-12}, {-8,12}, {8,-12}, {8,12}, {12,-8}, {12,8}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-3,-1}, {-3,1}, {-1,-3}, {-1,3}, {1,-3}, {1,3}, {3,-1}, {3,1}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-7,-1}, {-7,1}, {-5,-5}, {-5,5}, {-1,-7}, {-1,7}, {1,-7}, {1,7}, {5,-5}, {5,5}, {7,-1}, {7,1}, },{{-6,-5}, {-6,5}, {-5,-6}, {-5,6}, {5,-6}, {5,6}, {6,-5}, {6,5}, },{{-6,-4}, {-6,4}, {-4,-6}, {-4,6}, {4,-6}, {4,6}, {6,-4}, {6,4}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, }}, {{{-11,-11}, {-11,11}, {11,-11}, {11,11}, },{{-10,-10}, {-10,10}, {10,-10}, {10,10}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-5,-3}, {-5,3}, {-3,-5}, {-3,5}, {3,-5}, {3,5}, {5,-3}, {5,3}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, }}, {{{-12,-12}, {-12,12}, {12,-12}, {12,12}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-5,-3}, {-5,3}, {-3,-5}, {-3,5}, {3,-5}, {3,5}, {5,-3}, {5,3}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-9,-9}, {-9,9}, {9,-9}, {9,9}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, }}, }; int g[25][25]; int main(void) { int x, y; int i, j, k, m, c; long double d=0; scanf("%d%d", &x, &y); d+=sqrtl(x*x+y*y); g[x+12][y+12]=1; for (i=0; i<sizeof(p)/sizeof(p[0]); i++) { for (j=0; j<12; j++) { for (k=0; k<16 && p[i][j][k][0]; k++) { if (p[i][j][k][0]==x && p[i][j][k][1]==y) break; } if (k<16 && p[i][j][k][0]) { for (k=0, c=0; c<11; k++) { if (j==k) continue; for (m=0; m<16 && p[i][k][m][0]; m++) { if (!g[p[i][k][m][0]+12][p[i][k][m][1]+12]) { g[p[i][k][m][0]+12][p[i][k][m][1]+12]=1; printf("%d %d\n", p[i][k][m][0], p[i][k][m][1]); c++; break; } } } return 0; } } } return 0; } Almost Integer Rock Garden C++ Solution #include <stdio.h> #include <math.h> int pnt[][12][16][2]={ {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-4}, {-12,4}, {-4,-12}, {-4,12}, {4,-12}, {4,12}, {12,-4}, {12,4}, },{{-12,-4}, {-12,4}, {-4,-12}, {-4,12}, {4,-12}, {4,12}, {12,-4}, {12,4}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-10,-3}, {-10,3}, {-3,-10}, {-3,10}, {3,-10}, {3,10}, {10,-3}, {10,3}, },{{-9,-6}, {-9,6}, {-6,-9}, {-6,9}, {6,-9}, {6,9}, {9,-6}, {9,6}, },{{-12,-3}, {-12,3}, {-3,-12}, {-3,12}, {3,-12}, {3,12}, {12,-3}, {12,3}, },{{-12,-2}, {-12,2}, {-2,-12}, {-2,12}, {2,-12}, {2,12}, {12,-2}, {12,2}, },{{-11,-7}, {-11,7}, {-7,-11}, {-7,11}, {7,-11}, {7,11}, {11,-7}, {11,7}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, },{{-5,-4}, {-5,4}, {-4,-5}, {-4,5}, {4,-5}, {4,5}, {5,-4}, {5,4}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-7,-7}, {-7,7}, {7,-7}, {7,7}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-6,-2}, {-6,2}, {-2,-6}, {-2,6}, {2,-6}, {2,6}, {6,-2}, {6,2}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-3,-1}, {-3,1}, {-1,-3}, {-1,3}, {1,-3}, {1,3}, {3,-1}, {3,1}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-7}, {-7,7}, {7,-7}, {7,7}, },{{-2,-1}, {-2,1}, {-1,-2}, {-1,2}, {1,-2}, {1,2}, {2,-1}, {2,1}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-8,-4}, {-8,4}, {-4,-8}, {-4,8}, {4,-8}, {4,8}, {8,-4}, {8,4}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-1,-1}, {-1,1}, {1,-1}, {1,1}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-7,-1}, {-7,1}, {-5,-5}, {-5,5}, {-1,-7}, {-1,7}, {1,-7}, {1,7}, {5,-5}, {5,5}, {7,-1}, {7,1}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-2,-2}, {-2,2}, {2,-2}, {2,2}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-4,-2}, {-4,2}, {-2,-4}, {-2,4}, {2,-4}, {2,4}, {4,-2}, {4,2}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-7,-7}, {-7,7}, {7,-7}, {7,7}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, }}, {{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-4,-4}, {-4,4}, {4,-4}, {4,4}, },{{-3,-3}, {-3,3}, {3,-3}, {3,3}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-12,-7}, {-12,7}, {-7,-12}, {-7,12}, {7,-12}, {7,12}, {12,-7}, {12,7}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, }}, {{{-12,-11}, {-12,11}, {-11,-12}, {-11,12}, {11,-12}, {11,12}, {12,-11}, {12,11}, },{{-12,-11}, {-12,11}, {-11,-12}, {-11,12}, {11,-12}, {11,12}, {12,-11}, {12,11}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-2,-1}, {-2,1}, {-1,-2}, {-1,2}, {1,-2}, {1,2}, {2,-1}, {2,1}, },{{-12,-1}, {-12,1}, {-9,-8}, {-9,8}, {-8,-9}, {-8,9}, {-1,-12}, {-1,12}, {1,-12}, {1,12}, {8,-9}, {8,9}, {9,-8}, {9,8}, {12,-1}, {12,1}, },{{-11,-9}, {-11,9}, {-9,-11}, {-9,11}, {9,-11}, {9,11}, {11,-9}, {11,9}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-9,-2}, {-9,2}, {-7,-6}, {-7,6}, {-6,-7}, {-6,7}, {-2,-9}, {-2,9}, {2,-9}, {2,9}, {6,-7}, {6,7}, {7,-6}, {7,6}, {9,-2}, {9,2}, },{{-9,-1}, {-9,1}, {-1,-9}, {-1,9}, {1,-9}, {1,9}, {9,-1}, {9,1}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, }}, {{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-7}, {-10,7}, {-7,-10}, {-7,10}, {7,-10}, {7,10}, {10,-7}, {10,7}, },{{-9,-6}, {-9,6}, {-6,-9}, {-6,9}, {6,-9}, {6,9}, {9,-6}, {9,6}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-7,-3}, {-7,3}, {-3,-7}, {-3,7}, {3,-7}, {3,7}, {7,-3}, {7,3}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-6,-5}, {-6,5}, {-5,-6}, {-5,6}, {5,-6}, {5,6}, {6,-5}, {6,5}, }}, {{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-12,-11}, {-12,11}, {-11,-12}, {-11,12}, {11,-12}, {11,12}, {12,-11}, {12,11}, },{{-11,-7}, {-11,7}, {-7,-11}, {-7,11}, {7,-11}, {7,11}, {11,-7}, {11,7}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-11,-1}, {-11,1}, {-1,-11}, {-1,11}, {1,-11}, {1,11}, {11,-1}, {11,1}, },{{-9,-2}, {-9,2}, {-7,-6}, {-7,6}, {-6,-7}, {-6,7}, {-2,-9}, {-2,9}, {2,-9}, {2,9}, {6,-7}, {6,7}, {7,-6}, {7,6}, {9,-2}, {9,2}, },{{-9,-2}, {-9,2}, {-7,-6}, {-7,6}, {-6,-7}, {-6,7}, {-2,-9}, {-2,9}, {2,-9}, {2,9}, {6,-7}, {6,7}, {7,-6}, {7,6}, {9,-2}, {9,2}, }}, {{{-12,-1}, {-12,1}, {-9,-8}, {-9,8}, {-8,-9}, {-8,9}, {-1,-12}, {-1,12}, {1,-12}, {1,12}, {8,-9}, {8,9}, {9,-8}, {9,8}, {12,-1}, {12,1}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-2}, {-8,2}, {-2,-8}, {-2,8}, {2,-8}, {2,8}, {8,-2}, {8,2}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-7,-1}, {-7,1}, {-5,-5}, {-5,5}, {-1,-7}, {-1,7}, {1,-7}, {1,7}, {5,-5}, {5,5}, {7,-1}, {7,1}, },{{-4,-1}, {-4,1}, {-1,-4}, {-1,4}, {1,-4}, {1,4}, {4,-1}, {4,1}, }}, {{{-12,-2}, {-12,2}, {-2,-12}, {-2,12}, {2,-12}, {2,12}, {12,-2}, {12,2}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-10,-4}, {-10,4}, {-4,-10}, {-4,10}, {4,-10}, {4,10}, {10,-4}, {10,4}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, },{{-4,-4}, {-4,4}, {4,-4}, {4,4}, },{{-12,-8}, {-12,8}, {-8,-12}, {-8,12}, {8,-12}, {8,12}, {12,-8}, {12,8}, },{{-9,-3}, {-9,3}, {-3,-9}, {-3,9}, {3,-9}, {3,9}, {9,-3}, {9,3}, },{{-8,-3}, {-8,3}, {-3,-8}, {-3,8}, {3,-8}, {3,8}, {8,-3}, {8,3}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, }}, {{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-8,-2}, {-8,2}, {-2,-8}, {-2,8}, {2,-8}, {2,8}, {8,-2}, {8,2}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-3,-1}, {-3,1}, {-1,-3}, {-1,3}, {1,-3}, {1,3}, {3,-1}, {3,1}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-8,-8}, {-8,8}, {8,-8}, {8,8}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, },{{-5,-3}, {-5,3}, {-3,-5}, {-3,5}, {3,-5}, {3,5}, {5,-3}, {5,3}, }}, {{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-9,-9}, {-9,9}, {9,-9}, {9,9}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, },{{-1,-1}, {-1,1}, {1,-1}, {1,1}, }}, {{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, },{{-4,-2}, {-4,2}, {-2,-4}, {-2,4}, {2,-4}, {2,4}, {4,-2}, {4,2}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-11,-2}, {-11,2}, {-10,-5}, {-10,5}, {-5,-10}, {-5,10}, {-2,-11}, {-2,11}, {2,-11}, {2,11}, {5,-10}, {5,10}, {10,-5}, {10,5}, {11,-2}, {11,2}, },{{-10,-10}, {-10,10}, {10,-10}, {10,10}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, }}, {{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-12,-6}, {-12,6}, {-6,-12}, {-6,12}, {6,-12}, {6,12}, {12,-6}, {12,6}, },{{-11,-10}, {-11,10}, {-10,-11}, {-10,11}, {10,-11}, {10,11}, {11,-10}, {11,10}, },{{-10,-10}, {-10,10}, {10,-10}, {10,10}, },{{-5,-2}, {-5,2}, {-2,-5}, {-2,5}, {2,-5}, {2,5}, {5,-2}, {5,2}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-10,-1}, {-10,1}, {-1,-10}, {-1,10}, {1,-10}, {1,10}, {10,-1}, {10,1}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, }}, {{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-11,-5}, {-11,5}, {-5,-11}, {-5,11}, {5,-11}, {5,11}, {11,-5}, {11,5}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-6,-6}, {-6,6}, {6,-6}, {6,6}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-4}, {-12,4}, {-4,-12}, {-4,12}, {4,-12}, {4,12}, {12,-4}, {12,4}, },{{-12,-2}, {-12,2}, {-2,-12}, {-2,12}, {2,-12}, {2,12}, {12,-2}, {12,2}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-10,-8}, {-10,8}, {-8,-10}, {-8,10}, {8,-10}, {8,10}, {10,-8}, {10,8}, }}, {{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-9,-1}, {-9,1}, {-1,-9}, {-1,9}, {1,-9}, {1,9}, {9,-1}, {9,1}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-12,-3}, {-12,3}, {-3,-12}, {-3,12}, {3,-12}, {3,12}, {12,-3}, {12,3}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-7,-2}, {-7,2}, {-2,-7}, {-2,7}, {2,-7}, {2,7}, {7,-2}, {7,2}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, },{{-4,-2}, {-4,2}, {-2,-4}, {-2,4}, {2,-4}, {2,4}, {4,-2}, {4,2}, }}, {{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-1}, {-12,1}, {-9,-8}, {-9,8}, {-8,-9}, {-8,9}, {-1,-12}, {-1,12}, {1,-12}, {1,12}, {8,-9}, {8,9}, {9,-8}, {9,8}, {12,-1}, {12,1}, },{{-11,-8}, {-11,8}, {-8,-11}, {-8,11}, {8,-11}, {8,11}, {11,-8}, {11,8}, },{{-11,-4}, {-11,4}, {-4,-11}, {-4,11}, {4,-11}, {4,11}, {11,-4}, {11,4}, },{{-8,-2}, {-8,2}, {-2,-8}, {-2,8}, {2,-8}, {2,8}, {8,-2}, {8,2}, },{{-7,-2}, {-7,2}, {-2,-7}, {-2,7}, {2,-7}, {2,7}, {7,-2}, {7,2}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-12,-10}, {-12,10}, {-10,-12}, {-10,12}, {10,-12}, {10,12}, {12,-10}, {12,10}, },{{-11,-6}, {-11,6}, {-6,-11}, {-6,11}, {6,-11}, {6,11}, {11,-6}, {11,6}, },{{-9,-9}, {-9,9}, {9,-9}, {9,9}, },{{-8,-4}, {-8,4}, {-4,-8}, {-4,8}, {4,-8}, {4,8}, {8,-4}, {8,4}, },{{-8,-1}, {-8,1}, {-7,-4}, {-7,4}, {-4,-7}, {-4,7}, {-1,-8}, {-1,8}, {1,-8}, {1,8}, {4,-7}, {4,7}, {7,-4}, {7,4}, {8,-1}, {8,1}, }}, {{{-12,-8}, {-12,8}, {-8,-12}, {-8,12}, {8,-12}, {8,12}, {12,-8}, {12,8}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-2}, {-10,2}, {-2,-10}, {-2,10}, {2,-10}, {2,10}, {10,-2}, {10,2}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, },{{-3,-2}, {-3,2}, {-2,-3}, {-2,3}, {2,-3}, {2,3}, {3,-2}, {3,2}, },{{-3,-1}, {-3,1}, {-1,-3}, {-1,3}, {1,-3}, {1,3}, {3,-1}, {3,1}, },{{-7,-5}, {-7,5}, {-5,-7}, {-5,7}, {5,-7}, {5,7}, {7,-5}, {7,5}, },{{-7,-1}, {-7,1}, {-5,-5}, {-5,5}, {-1,-7}, {-1,7}, {1,-7}, {1,7}, {5,-5}, {5,5}, {7,-1}, {7,1}, },{{-6,-5}, {-6,5}, {-5,-6}, {-5,6}, {5,-6}, {5,6}, {6,-5}, {6,5}, },{{-6,-4}, {-6,4}, {-4,-6}, {-4,6}, {4,-6}, {4,6}, {6,-4}, {6,4}, },{{-6,-3}, {-6,3}, {-3,-6}, {-3,6}, {3,-6}, {3,6}, {6,-3}, {6,3}, },{{-5,-1}, {-5,1}, {-1,-5}, {-1,5}, {1,-5}, {1,5}, {5,-1}, {5,1}, }}, {{{-11,-11}, {-11,11}, {11,-11}, {11,11}, },{{-10,-10}, {-10,10}, {10,-10}, {10,10}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-5,-3}, {-5,3}, {-3,-5}, {-3,5}, {3,-5}, {3,5}, {5,-3}, {5,3}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, }}, {{{-12,-12}, {-12,12}, {12,-12}, {12,12}, },{{-10,-9}, {-10,9}, {-9,-10}, {-9,10}, {9,-10}, {9,10}, {10,-9}, {10,9}, },{{-9,-5}, {-9,5}, {-5,-9}, {-5,9}, {5,-9}, {5,9}, {9,-5}, {9,5}, },{{-9,-4}, {-9,4}, {-4,-9}, {-4,9}, {4,-9}, {4,9}, {9,-4}, {9,4}, },{{-6,-1}, {-6,1}, {-1,-6}, {-1,6}, {1,-6}, {1,6}, {6,-1}, {6,1}, },{{-5,-3}, {-5,3}, {-3,-5}, {-3,5}, {3,-5}, {3,5}, {5,-3}, {5,3}, },{{-11,-3}, {-11,3}, {-9,-7}, {-9,7}, {-7,-9}, {-7,9}, {-3,-11}, {-3,11}, {3,-11}, {3,11}, {7,-9}, {7,9}, {9,-7}, {9,7}, {11,-3}, {11,3}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-10,-6}, {-10,6}, {-6,-10}, {-6,10}, {6,-10}, {6,10}, {10,-6}, {10,6}, },{{-9,-9}, {-9,9}, {9,-9}, {9,9}, },{{-8,-7}, {-8,7}, {-7,-8}, {-7,8}, {7,-8}, {7,8}, {8,-7}, {8,7}, },{{-8,-5}, {-8,5}, {-5,-8}, {-5,8}, {5,-8}, {5,8}, {8,-5}, {8,5}, }}, }; int garden[25][25]; int main(void) { int x, y; int i, j, k, m, c; long double d=0; scanf("%d%d", &x, &y); d+=sqrtl(x*x+y*y); garden[x+12][y+12]=1; for (i=0; i<sizeof(pnt)/sizeof(pnt[0]); i++) { for (j=0; j<12; j++) { for (k=0; k<16 && pnt[i][j][k][0]; k++) { if (pnt[i][j][k][0]==x && pnt[i][j][k][1]==y) break; } if (k<16 && pnt[i][j][k][0]) { for (k=0, c=0; c<11; k++) { if (j==k) continue; for (m=0; m<16 && pnt[i][k][m][0]; m++) { if (!garden[pnt[i][k][m][0]+12][pnt[i][k][m][1]+12]) { garden[pnt[i][k][m][0]+12][pnt[i][k][m][1]+12]=1; printf("%d %d\n", pnt[i][k][m][0], pnt[i][k][m][1]); // d+=sqrtl(pnt[i][k][m][0]*pnt[i][k][m][0]+pnt[i][k][m][1]*pnt[i][k][m][1]); c++; break; } } } // printf("%.60Lf\n", d); return 0; } } } return 0; } Almost Integer Rock Garden C Sharp Solution using System.CodeDom.Compiler; using System.Collections.Generic; using System.Collections; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.Serialization; using System.Text.RegularExpressions; using System.Text; using System; class Solution61 { const long R = 100000000000000L; static int xy2ix(int x, int y) { return (x + 12) * 26 + y + 12; } static int ix2x(int ix) { return ix / 26 - 12; } static int ix2y(int ix) { return ix % 26 - 12; } static long[] ixDs = null; static int[][] ixSv = null; static List<int> ixVs = null; static Dictionary<long, List<int>> garden = null; static HashSet<int> ixQ = null; static long[][] solutions = new long[][] { new long[] { 3840481040530,4536101718730,16552506059640,40312423743285,36931687685300,44030650891060,81665382639200,89244398944980,4536101718730,48528137423857,64911064067350,64911064067350 }, new long[] { 97056274847710,29563014098700,63014581273460,8276253029822,40175425099140,45362404707370,72792206135790,43398113205660,66190378969060,66190378969060,84885780179610,83095189484530 }, new long[] { 97056274847710,29563014098700,63014581273460,8276253029822,40175425099140,84885780179610,43398113205660,83095189484530,45362404707370,66190378969060,66190378969060,72792206135790 }, new long[] { 27882059609970,27882059609970,48528137423857,23606797749979,80624847486570,84885780179610,48683298050514,21954445729289,4159457879230,21267040355190,4987562112090,5538513813742 }, new long[] { 27882059609970,27882059609970,48528137423857,23606797749979,4159457879230,21267040355190,80624847486570,84885780179610,4987562112090,48683298050514,21954445729289,5538513813742 }, new long[] { 62049935181330,40175425099140,77032961426900,83095189484530,4536101718730,5538513813742,94427190999916,16227766016838,42220510185600,89244398944980,44030650891060,41421356237310 }, new long[] { 62049935181330,40175425099140,77032961426900,83095189484530,89244398944980,44030650891060,94427190999916,41421356237310,42220510185600,4536101718730,5538513813742,16227766016838 }, new long[] { 41640786499870,60232526704263,24264068711928,16227766016838,40175425099140,19803902718560,9901951359278,60555127546399,81665382639200,81665382639200,81024967590665,82842712474619 }, new long[] { 41640786499870,60232526704263,24264068711928,16227766016838,40175425099140,19803902718560,81024967590665,41421356237310,42220510185600,81665382639200,9901951359278,41421356237310 }, new long[] { 55634918610400,29563014098700,63014581273460,8276253029822,40175425099140,14213562373100,84885780179610,83095189484530,45362404707370,66190378969060,66190378969060,43398113205660 }, new long[] { 55634918610400,29563014098700,63014581273460,8276253029822,40175425099140,66190378969060,84885780179610,83095189484530,14213562373100,45362404707370,66190378969060,43398113205660 }, new long[] { 86606874731850,14213562373100,63014581273460,23606797749979,18033988749890,19803902718560,84885780179610,84885780179610,41640786499870,19803902718560,4987562112090,38516480713450 }, new long[] { 86606874731850,14213562373100,63014581273460,23606797749979,18033988749890,19803902718560,84885780179610,38516480713450,41640786499870,19803902718560,4987562112090,84885780179610 }, new long[] { 60147050873540,80624847486570,66190378969060,54400374531753,42220510185600,41640786499870,18033988749890,18033988749890,60147050873540,8304597359460,44030650891060,6225774829855 }, new long[] { 60147050873540,80624847486570,66190378969060,54400374531753,42220510185600,41640786499870,41640786499870,44030650891060,60147050873540,8304597359460,94427190999916,6225774829855 }, new long[] { 52996408614170,62049935181330,5538513813742,32455532033676,40175425099140,63014581273460,60232526704263,60555127546399,70469991071960,20655561573370,21954445729289,9901951359278 }, new long[] { 52996408614170,62049935181330,5538513813742,32455532033676,70469991071960,20655561573370,21954445729289,60555127546399,40175425099140,63014581273460,60232526704263,9901951359278 }, new long[] { 31370849898480,19803902718560,19803902718560,60555127546399,8304597359460,80624847486570,29563014098700,16227766016838,19803902718560,24621125123532,6225774829855,83095189484530 }, new long[] { 31370849898480,19803902718560,19803902718560,60555127546399,80624847486570,6225774829855,83095189484530,16227766016838,8304597359460,19803902718560,29563014098700,24621125123532 }, new long[] { 89949493661166,89244398944980,40175425099140,70820393249937,89244398944980,8304597359460,47213595499958,60555127546399,89244398944980,4987562112090,48683298050514,61577310586391 }, new long[] { 89949493661166,89244398944980,40175425099140,70820393249937,89244398944980,61577310586391,47213595499958,60555127546399,89244398944980,8304597359460,4987562112090,48683298050514 }, new long[] { 28010988928052,84885780179610,5538513813742,9901951359278,45362404707370,45362404707370,84885780179610,60232526704263,36931687685300,43398113205660,8276253029822,47213595499958 }, new long[] { 28010988928052,84885780179610,5538513813742,9901951359278,36931687685300,45362404707370,43398113205660,60232526704263,45362404707370,84885780179610,8276253029822,47213595499958 }, new long[] { 7106781186548,60232526704263,16227766016838,23606797749979,18033988749890,9901951359278,9901951359278,9901951359278,42220510185600,40175425099140,81665382639200,81024967590665 }, new long[] { 7106781186548,60232526704263,16227766016838,23606797749979,42220510185600,40175425099140,19803902718560,94427190999916,81665382639200,81024967590665,9901951359278,23606797749979 }, new long[] { 21110255092798,60232526704263,16227766016838,23606797749979,18033988749890,19803902718560,81024967590665,21110255092798,40175425099140,81665382639200,7106781186548,9901951359278 }, new long[] { 21110255092798,60232526704263,16227766016838,23606797749979,19803902718560,81665382639200,7106781186548,81024967590665,40175425099140,18033988749890,21110255092798,9901951359278 }, new long[] { 65685424949238,60232526704263,16227766016838,23606797749979,40175425099140,18033988749890,19803902718560,41421356237310,42220510185600,81665382639200,81024967590665,9901951359278 }, new long[] { 65685424949238,60232526704263,16227766016838,23606797749979,40175425099140,81024967590665,9901951359278,41421356237310,42220510185600,18033988749890,19803902718560,81665382639200 }, new long[] { 12310562561766,64911064067350,64911064067350,70469991071960,4159457879230,24621125123532,7106781186548,16227766016838,80624847486570,84885780179610,84885780179610,84885780179610 }, new long[] { 12310562561766,64911064067350,64911064067350,70469991071960,4159457879230,80624847486570,84885780179610,24621125123532,84885780179610,84885780179610,7106781186548,16227766016838 }, }; static void AddSolution(long[] solution) { for (int i = 0; i < solution.Length; i++) { foreach (int v in garden[solution[i]]) { if (!ixQ.Contains(v)) continue; HashSet<int> s11 = new HashSet<int>(); for (int j = 0; j < solution.Length; j++) { if (i == j) continue; int[] uu = garden[solution[j]].Where(p => p != v && !s11.Contains(p)).ToArray(); if (uu.Length == 0) break; s11.Add(uu[0]); } if (s11.Count == 11) ixSv[v] = s11.ToArray(); ixQ.Remove(v); } } } static void Main(String[] args) { //---------------------------------------------------------------------- StreamReader sr = new StreamReader(Console.OpenStandardInput()); StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()); //---------------------------------------------------------------------- int[] xy = sr.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(p => int.Parse(p)).ToArray(); ixDs = new long[26 * 26 + 1]; for (int i = 0; i < 26 * 26 + 1; i++) ixDs[i] = -1; ixSv = new int[26 * 26 + 1][]; ixVs = new List<int>(); garden = new Dictionary<long, List<int>>(); ixQ = new HashSet<int>(); for (int x = -12; x <= 12; x++) for (int y = -12; y <= 12; y++) { int z2 = x * x + y * y; int z = (int)Math.Sqrt(z2); if (z * z == z2) continue; decimal ds = (decimal)Math.Sqrt(z2); ds = ds - (int)ds; ds = ds * R; long lds = (long)ds; int ix = xy2ix(x, y); if (!garden.ContainsKey(lds)) garden[lds] = new List<int>(); garden[lds].Add(ix); ixDs[ix] = lds; ixVs.Add(ix); ixQ.Add(ix); } foreach (long[] solution in solutions) AddSolution(solution); foreach (int v in ixSv[xy2ix(xy[0], xy[1])]) sw.WriteLine("{0} {1}", ix2x(v), ix2y(v)); //---------------------------------------------------------------------- sr.Dispose(); sw.Dispose(); //---------------------------------------------------------------------- } } Almost Integer Rock Garden Java Solution import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.InputStreamReader; import java.util.TreeMap; import java.util.StringTokenizer; import java.util.Map; import java.util.Map.Entry; import java.io.BufferedReader; import java.util.LinkedList; import java.io.InputStream; public class Solution { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; MyReader in = new MyReader(inputStream); PrintWriter out = new PrintWriter(outputStream); AlmostIntegerRockGarden solver = new AlmostIntegerRockGarden(); solver.solve(1, in, out); out.close(); } static class AlmostIntegerRockGarden { Map<Integer, Integer> m = new TreeMap<>(); Map<Integer, LinkedList<Integer[]>> m2 = new TreeMap<>(); public void solve(int testNumber, MyReader in, PrintWriter out) { int x = in.nextInt(); int y = in.nextInt(); for (int i = -12; i <= 12; i++) { for (int j = -12; j <= 12; j++) { int d2 = i * i + j * j; if (isZero(Math.sqrt(d2) - (int) (Math.sqrt(d2)))) { // System.err.printf("zero %s \n", d2); } else { if (!m.containsKey(d2)) { m.put(d2, 0); m2.put(d2, new LinkedList<>()); } m.put(d2, m.get(d2) + 1); m2.get(d2).add(new Integer[]{i, j}); } } } int targetD2 = x * x + y * y; int targetidx = -1; int n = m.size(); Integer[] vs = new Integer[n]; int[] vsSize = new int[n]; int idx = 0; for (Map.Entry<Integer, Integer> entry : m.entrySet()) { vs[idx] = entry.getKey(); vsSize[idx] = entry.getValue(); if (targetD2 == entry.getKey()) { targetidx = idx; } idx++; } int[][] groups = new int[][]{ {3, 14, 14, 16, 31, 31, 31, 45, 46, 50, 52, 52}, {3, 4, 13, 19, 32, 33, 41, 43, 47, 59, 59, 59}, {21, 24, 36, 41, 41, 44, 47, 54, 56, 58, 58, 62}, {0, 9, 31, 31, 33, 34, 34, 37, 53, 56, 56, 63}, {9, 15, 15, 31, 31, 33, 34, 34, 37, 56, 60, 63}, {2, 3, 6, 8, 8, 8, 20, 25, 39, 43, 56, 62}, {0, 24, 27, 29, 40, 40, 48, 49, 49, 54, 55, 55}, {0, 2, 2, 3, 8, 20, 25, 34, 39, 43, 56, 62}, {21, 24, 26, 36, 44, 47, 54, 56, 56, 58, 58, 62}, {9, 26, 26, 26, 31, 31, 33, 34, 34, 37, 60, 63}, {11, 12, 29, 31, 35, 37, 43, 44, 44, 57, 60, 64}, {11, 12, 29, 31, 35, 37, 43, 44, 44, 53, 57, 67}, {9, 10, 21, 21, 24, 25, 30, 38, 41, 44, 48, 62}, {2, 4, 16, 19, 30, 33, 41, 43, 47, 59, 59, 59}, {4, 8, 13, 25, 27, 28, 37, 43, 45, 49, 51, 65}, {7, 9, 31, 31, 33, 34, 34, 37, 41, 41, 60, 63}, {18, 18, 28, 30, 31, 40, 42, 44, 48, 49, 61, 66}, {1, 23, 27, 28, 30, 31, 33, 46, 54, 61, 66, 66}, {3, 5, 16, 22, 31, 31, 31, 45, 46, 52, 52, 54}, {0, 10, 13, 30, 31, 31, 31, 45, 46, 50, 52, 54}, {3, 4, 4, 4, 8, 16, 20, 25, 34, 43, 56, 62}, {3, 4, 4, 8, 16, 17, 20, 25, 34, 39, 43, 56} }; int[] g = new int[0]; for (int i = 0; i < groups.length; i++) { for (int j = 0; j < groups[i].length; j++) { if (groups[i][j] == targetidx) { g = groups[i]; } } } double sum = Math.sqrt(x * x + y * y); boolean first = true; for (int i = 0; i < g.length; i++) { if (targetidx == g[i]) { if (first) { first = false; continue; } } Integer[] point = m2.get(vs[g[i]]).removeFirst(); if (point[0] == x && point[1] == y) { point = m2.get(vs[g[i]]).removeFirst(); } out.println(point[0] + " " + point[1]); sum += Math.sqrt(point[0] * point[0] + point[1] * point[1]); } } boolean isZero(double v) { return Math.abs(v) < 1E-12; } } static class MyReader { public BufferedReader reader; public StringTokenizer tokenizer; public MyReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } } Almost Integer Rock Garden Python Solution import math import os import random import re import sys solutions = [] solutions.append({(7, 11), (11, 1), (-2, 12), (5, 4), (12, -3), (10, 3), (9, 6), (-12, -7), (1,11),(-6,-6),(12,-4),(4,12)}) solutions.append({(-12, 8), (9, -6), (10, 5), (-5, 1), (3, 3), (3, 1), (-10, -2), (2, 1), (7, 5), (2, 2), (6, 5), (9, 7)}) solutions.append({(10, 5), (-2, 1), (3, 3), (3, 1), (10, 2), (-7, -5), (12, 8), (2, 2), (6, -5), (5, 1), (-9, 6), (9, 7)}) solutions.append({(10, 2), (-2, 2), (12, 6), (3, -1), (-11, 3), (-7, -5), (2, 2), (5, 1), (9, 6), (1, 1), (6, 5), (12, 8)}) solutions.append({(9, 7), (3, 2), (-10, 2), (-5, 1), (7, 1), (7, -5), (3, 1), (-9, -6), (4, 2), (9, 6), (6, 5), (8, 4)}) solutions.append({(7, 3), (-12, -7), (6, -3), (11, 5), (12, 7), (9, 3), (7, 7), (-12, 7), (-3, 2), (10, 1), (4, 2), (9, 7)}) solutions.append({(7, 3), (10, 8), (-5, 1), (11, 4), (9, 1), (10, 6), (-11, -2), (12, 11), (6, -6), (12, 10), (-11, 7), (10, 9)}) solutions.append({(9, 7), (-9, -1), (12, 7), (-10, 4), (-3, 1), (11, 1), (12, 8), (8, -4), (12, 10), (10, 3), (1, 1), (5, 3)}) solutions.append({(11, 7), (3, 2), (10, 8), (11, 4), (9, 2), (-11, 1), (11, 2), (-7, 6), (-11, -1), (10, -8), (10, 1), (12, 11)}) solutions.append({(10, 8), (8, 3), (10, 5), (8, 1), (10, 6), (12, 6), (-11, 8), (-10, 5), (11, -5), (10, 3), (-11, -8), (12, 8)}) solutions.append({(12, 2), (8, 3), (-4, 4), (10, 4), (8, 1), (-10, -5), (10, 6), (9, 3), (7, 5), (-12, 8), (7, -4), (5, 2)}) solutions.append({(-9, 4), (11, 4), (12, 1), (8, 2), (7, 1), (-10, -8), (3, 1), (9, -4), (12, 4), (9, 4), (-12, 4), (4, 1)}) solutions.append({(10, 8), (12, 1), (11, 4), (5, 5), (-9, -4), (3, 1), (9, -4), (-6, 2), (6, 2), (9, 4), (-12, 4), (12, 3)}) solutions.append({(9, 7), (-12, 12), (-9, 5), (6, 1), (10, 6), (-10, -6), (9, -9), (8, 7), (9, 4), (8, 5), (10, 9), (5, 3)}) solutions.append({(-9, 4), (10, 10), (6, 1), (10, 6), (-11, -3), (10, -6), (8, 7), (-11, 11), (9, 5), (8, 5), (10, 9), (5, 3)}) solutions.append({(6, 4), (9, 7), (5, 5), (3, 1), (3, -2), (-7, -5), (-3, 2), (-12, 6), (5, 1), (9, 6), (6, 5), (10, 2)}) solutions.append({(8, -7), (3, 2), (5, 1), (-9, -1), (10, 7), (9, 2), (-7, 5), (11, 3), (-11, 4), (6, 2), (12, 10), (11, 6)}) solutions.append({(11, 4), (8, 2), (-12, -10), (11, 8), (8, 1), (9, 8), (9, 9), (-12, 10), (-7, 2), (12, -10), (11, 6), (8, 4)}) solutions.append({(10, 8), (12, 1), (9, 1), (7, 6), (9, 3), (11, 9), (2, 1), (-12, 11), (9, -4), (12, 11), (-6, 6), (-10, -1)}) solutions.append({(7, 3), (11, 10), (11, 5), (10, 7), (-8, -5), (-8, 5), (11, 3), (8, -5), (7, 5), (9, 5), (-9, 6), (6, 5)}) solutions.append({(12, 2), (9, 2), (10, 7), (-9, -4), (11, 9), (10, 6), (-12, 11), (9, -3), (8, 8), (11, 1), (-7, 2), (7, 2)}) solutions2 = [] for sol in solutions: solutions2.append(list(map(lambda p:(p[0], -p[1]) , sol))) solutions += solutions2 solutions2 = [] for sol in solutions: solutions2.append(list(map(lambda p:(-p[0], p[1]) , sol))) solutions += solutions2 solutions2 = [] for sol in solutions: solutions2.append(list(map(lambda p:(p[1], p[0]) , sol))) solutions += solutions2 X,Y = map(int, sys.stdin.readline().split()) for sol in solutions: if (X, Y) in sol: for p in sol: if p != (X, Y): print(p[0], p[1]) break c C# C++ HackerRank Solutions java javascript python CcppCSharpHackerrank Solutionsjavajavascriptpython