#!/bin/python3 import sys o = int(input().strip()) # your code goes here ans=[[[4, 4, 2, 8], [4, 2, 4, 4], [2, 4, -1, -1], [8, 4, -1, 1]], [[5, 4, 3, 2, 5], [4, -1, 2, -1, -1], [3, 2, -1, -1, -1], [2, -1, -1, -1, -1], [5, -1, -1, -1, 1]], [[6, 4, 4, 8, 2, 12], [4, 3, 4, 2, 16, 3], [4, 4, 2, 4, 4, 4], [8, 2, 4, -1, -1, -1], [2, 16, 4, -1, -1, -1], [12, 3, 4, -1, -1, 1]], [[7, 6, 5, 6, 5, 2, 7], [6, -1, 6, -1, 2, -1, -1], [5, 6, -1, 2, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1], [5, 2, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1], [7, -1, -1, -1, -1, -1, 1]], [[8, 6, 4, 4, 6, 12, 2, 16], [6, 4, 6, 4, 8, 2, 8, 8], [4, 6, -1, 4, 2, -1, -1, -1], [4, 4, 4, 2, 4, 4, 4, 4], [6, 8, 2, 4, -1, -1, -1, -1], [12, 2, -1, 4, -1, -1, -1, -1], [2, 8, -1, 4, -1, -1, -1, -1], [16, 8, -1, 4, -1, -1, -1, 1]], [[9, 6, 5, 8, 5, 6, 7, 2, 9], [6, -1, 6, -1, 10, -1, 2, -1, -1], [5, 6, 3, 6, 7, 2, 13, -1, 3], [8, -1, 6, -1, 2, -1, -1, -1, -1], [5, 10, 7, 2, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1], [7, 2, 13, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1], [9, -1, 3, -1, -1, -1, -1, -1, 1]], [[10, 8, 6, 4, 4, 8, 6, 16, 2, 20], [8, 5, 4, 4, 4, 3, 8, 2, 28, 5], [6, 4, -1, 8, 4, -1, 2, 16, -1, -1], [4, 4, 8, -1, 4, 2, -1, -1, -1, -1], [4, 4, 4, 4, 2, 4, 4, 4, 4, 4], [8, 3, -1, 2, 4, -1, -1, -1, -1, -1], [6, 8, 2, -1, 4, -1, -1, -1, -1, -1], [16, 2, 16, -1, 4, -1, -1, -1, -1, -1], [2, 28, -1, -1, 4, -1, -1, -1, -1, -1], [20, 5, -1, -1, 4, -1, -1, -1, -1, 1]], [[11, 8, 7, 6, 7, 10, 7, 6, 9, 2, 11], [8, -1, 6, -1, 6, -1, 14, -1, 2, -1, -1], [7, 6, -1, 8, 7, -1, 7, 2, -1, -1, -1], [6, -1, 8, -1, 6, -1, 2, -1, -1, -1, -1], [7, 6, 7, 6, -1, 2, -1, -1, -1, -1, -1], [10, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1], [7, 14, 7, 2, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [11, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[12, 8, 6, 8, 4, 4, 8, 12, 6, 20, 2, 24], [8, 6, 6, 4, 10, 4, 12, 8, 12, 2, 12, 12], [6, 6, 4, 8, 6, 4, 8, 8, 2, 8, 8, 8], [8, 4, 8, 3, 8, 4, 12, 2, 36, 16, -1, 3], [4, 10, 6, 8, -1, 4, 2, -1, -1, -1, -1, -1], [4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4], [8, 12, 8, 12, 2, 4, -1, -1, -1, -1, -1, -1], [12, 8, 8, 2, -1, 4, -1, -1, -1, -1, -1, -1], [6, 12, 2, 36, -1, 4, -1, -1, -1, -1, -1, -1], [20, 2, 8, 16, -1, 4, -1, -1, -1, -1, -1, -1], [2, 12, 8, -1, -1, 4, -1, -1, -1, -1, -1, -1], [24, 12, 8, 3, -1, 4, -1, -1, -1, -1, -1, 1]], [[13, 10, 7, 6, 5, 12, 7, 10, 9, 6, 11, 2, 13], [10, -1, 6, -1, 6, -1, 6, -1, 18, -1, 2, -1, -1], [7, 6, -1, 6, 7, -1, 9, 14, -1, 2, -1, -1, -1], [6, -1, 6, -1, 10, -1, 10, -1, 2, -1, -1, -1, -1], [5, 6, 7, 10, -1, 6, 11, 2, -1, -1, -1, -1, -1], [12, -1, -1, -1, 6, -1, 2, -1, -1, -1, -1, -1, -1], [7, 6, 9, 10, 11, 2, -1, -1, -1, -1, -1, -1, -1], [10, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [9, 18, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[14, 10, 8, 8, 6, 4, 4, 8, 10, 16, 6, 24, 2, 28], [10, 7, 8, 6, 4, 5, 4, 6, 8, 5, 12, 2, 40, 7], [8, 8, -1, 4, 6, -1, 4, 16, -1, 8, 2, -1, -1, -1], [8, 6, 4, -1, 10, 6, 4, -1, 20, 2, 16, -1, -1, -1], [6, 4, 6, 10, -1, 8, 4, 12, 2, -1, -1, -1, -1, -1], [4, 5, -1, 6, 8, -1, 4, 2, -1, -1, -1, -1, -1, -1], [4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4], [8, 6, 16, -1, 12, 2, 4, -1, -1, -1, -1, -1, -1, -1], [10, 8, -1, 20, 2, -1, 4, -1, -1, -1, -1, -1, -1, -1], [16, 5, 8, 2, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1], [6, 12, 2, 16, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1], [24, 2, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1], [2, 40, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1], [28, 7, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, 1]], [[15, 10, 9, 6, 7, 10, 9, 14, 9, 10, 11, 6, 13, 2, 15], [10, -1, 6, -1, 10, -1, 10, -1, 6, -1, 22, -1, 2, -1, -1], [9, 6, 5, 6, 5, 4, 7, 10, 3, 14, 13, 2, 23, -1, 5], [6, -1, 6, -1, 10, -1, 14, -1, 10, -1, 2, -1, -1, -1, -1], [7, 10, 5, 10, 3, 10, 9, 14, 13, 2, 23, -1, -1, -1, 3], [10, -1, 4, -1, 10, -1, 6, -1, 2, -1, -1, -1, -1, -1, -1], [9, 10, 7, 14, 9, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1], [14, -1, 10, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [9, 6, 3, 10, 13, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [11, 22, 13, 2, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, 2, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [15, -1, 5, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[16, 12, 8, 8, 6, 8, 4, 4, 8, 12, 10, 20, 6, 28, 2, 32], [12, 8, 8, 6, 8, 4, 14, 4, 16, 6, 16, 12, 16, 2, 16, 16], [8, 8, -1, 8, 4, -1, 6, 4, -1, 20, 8, -1, 2, 28, -1, -1], [8, 6, 8, 4, 8, 6, 8, 4, 8, 8, 8, 2, 8, 8, 8, 8], [6, 8, 4, 8, -1, 12, 6, 4, 10, -1, 2, 68, 16, -1, -1, -1], [8, 4, -1, 6, 12, -1, 8, 4, -1, 2, -1, -1, -1, -1, -1, -1], [4, 14, 6, 8, 6, 8, -1, 4, 2, -1, -1, -1, -1, -1, -1, -1], [4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4], [8, 16, -1, 8, 10, -1, 2, 4, -1, -1, -1, -1, -1, -1, -1, -1], [12, 6, 20, 8, -1, 2, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1], [10, 16, 8, 8, 2, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1], [20, 12, -1, 2, 68, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1], [6, 16, 2, 8, 16, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1], [28, 2, 28, 8, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1], [2, 16, -1, 8, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1], [32, 16, -1, 8, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, 1]], [[17, 12, 9, 8, 7, 6, 7, 16, 9, 14, 11, 10, 13, 6, 15, 2, 17], [12, -1, 8, -1, 6, -1, 10, -1, 14, -1, 6, -1, 26, -1, 2, -1, -1], [9, 8, -1, 8, 5, -1, 9, 6, -1, 18, 13, -1, 13, 2, -1, -1, -1], [8, -1, 8, -1, 6, -1, 6, -1, 18, -1, 14, -1, 2, -1, -1, -1, -1], [7, 6, 5, 6, -1, 12, 11, 10, 9, -1, 13, 2, -1, -1, -1, -1, -1], [6, -1, -1, -1, 12, -1, 10, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1], [7, 10, 9, 6, 11, 10, -1, 6, 15, 2, -1, -1, -1, -1, -1, -1, -1], [16, -1, 6, -1, 10, -1, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [9, 14, -1, 18, 9, -1, 15, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, -1, 18, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [11, 6, 13, 14, 13, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, 26, 13, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [15, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[18, 12, 10, 8, 6, 12, 8, 4, 4, 8, 12, 16, 10, 24, 6, 32, 2, 36], [12, 9, 8, 6, 8, 5, 4, 8, 4, 5, 8, 6, 12, 7, 16, 2, 52, 9], [10, 8, 6, 8, 6, 4, 6, 12, 4, 12, 12, 8, 12, 12, 2, 12, 12, 12], [8, 6, 8, -1, 4, 6, 14, -1, 4, 10, 20, -1, 8, 2, -1, -1, -1, -1], [6, 8, 6, 4, -1, 12, 8, 16, 4, -1, 10, 20, 2, 16, -1, -1, -1, -1], [12, 5, 4, 6, 12, 3, 12, 6, 4, 7, 24, 2, 56, 13, 16, -1, -1, 3], [8, 4, 6, 14, 8, 12, -1, 8, 4, 20, 2, -1, -1, -1, -1, -1, -1, -1], [4, 8, 12, -1, 16, 6, 8, -1, 4, 2, -1, -1, -1, -1, -1, -1, -1, -1], [4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4], [8, 5, 12, 10, -1, 7, 20, 2, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [12, 8, 12, 20, 10, 24, 2, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [16, 6, 8, -1, 20, 2, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, 12, 12, 8, 2, 56, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [24, 7, 12, 2, 16, 13, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, 16, 2, -1, -1, 16, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [32, 2, 12, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, 52, 12, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1], [36, 9, 12, -1, -1, 3, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[19, 14, 11, 10, 7, 6, 7, 14, 11, 18, 11, 14, 13, 10, 15, 6, 17, 2, 19], [14, -1, 10, -1, 10, -1, 6, -1, 10, -1, 18, -1, 6, -1, 30, -1, 2, -1, -1], [11, 10, -1, 10, 7, -1, 7, 16, -1, 6, 11, -1, 15, 22, -1, 2, -1, -1, -1], [10, -1, 10, -1, 6, -1, 6, -1, 14, -1, 22, -1, 14, -1, 2, -1, -1, -1, -1], [7, 10, 7, 6, -1, 10, 11, 6, 13, -1, 13, 26, 17, 2, -1, -1, -1, -1, -1], [6, -1, -1, -1, 10, -1, 14, -1, -1, -1, 10, -1, 2, -1, -1, -1, -1, -1, -1], [7, 6, 7, 6, 11, 14, -1, 10, 13, 14, 17, 2, -1, -1, -1, -1, -1, -1, -1], [14, -1, 16, -1, 6, -1, 10, -1, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [11, 10, -1, 14, 13, -1, 13, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [18, -1, 6, -1, -1, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [11, 18, 11, 22, 13, 10, 17, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, -1, -1, -1, 26, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, 6, 15, 14, 17, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, -1, 22, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [15, 30, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [17, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[20, 14, 10, 8, 8, 12, 6, 8, 4, 4, 8, 12, 14, 20, 10, 28, 6, 36, 2, 40], [14, 10, 8, 8, 8, 6, 12, 4, 18, 4, 20, 8, 20, 6, 20, 16, 20, 2, 20, 20], [10, 8, -1, 8, 8, -1, 4, 12, -1, 4, 6, -1, 8, 28, -1, 12, 2, -1, -1, -1], [8, 8, 8, 5, 8, 4, 8, 4, 12, 4, 16, 3, 20, 8, 24, 2, 64, 28, -1, 5], [8, 8, 8, 8, 4, 8, 8, 8, 8, 4, 8, 8, 8, 8, 2, 8, 8, 8, 8, 8], [12, 6, -1, 4, 8, -1, 14, 8, -1, 4, 12, -1, 32, 2, -1, 16, -1, -1, -1, -1], [6, 12, 4, 8, 8, 14, -1, 12, 6, 4, 12, 12, 2, -1, -1, -1, -1, -1, -1, -1], [8, 4, 12, 4, 8, 8, 12, -1, 8, 4, 20, 2, -1, -1, -1, -1, -1, -1, -1, -1], [4, 18, -1, 12, 8, -1, 6, 8, -1, 4, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [8, 20, 6, 16, 8, 12, 12, 20, 2, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [12, 8, -1, 3, 8, -1, 12, 2, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, 20, 8, 20, 8, 32, 2, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [20, 6, 28, 8, 8, 2, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, 20, -1, 24, 2, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [28, 16, 12, 2, 8, 16, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, 20, 2, 64, 8, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [36, 2, -1, 28, 8, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, 20, -1, -1, 8, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [40, 20, -1, 5, 8, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[21, 14, 11, 10, 9, 6, 9, 10, 9, 20, 11, 18, 13, 14, 15, 10, 17, 6, 19, 2, 21], [14, -1, 10, -1, 6, -1, 14, -1, 10, -1, 10, -1, 22, -1, 6, -1, 34, -1, 2, -1, -1], [11, 10, 7, 6, 9, 6, 7, 6, 5, 10, 11, 6, 13, 18, 5, 22, 19, 2, 33, -1, 7], [10, -1, 6, -1, 10, -1, 14, -1, 6, -1, 10, -1, 26, -1, 18, -1, 2, -1, -1, -1, -1], [9, 6, 9, 10, -1, 6, 9, 16, 9, -1, 15, 10, 15, 14, -1, 2, -1, -1, -1, -1, -1], [6, -1, 6, -1, 6, -1, 14, -1, 6, -1, 18, -1, 10, -1, 2, -1, -1, -1, -1, -1, -1], [9, 14, 7, 14, 9, 14, 3, 14, 13, 18, 15, 22, 19, 2, 33, -1, -1, -1, -1, -1, 3], [10, -1, 6, -1, 16, -1, 14, -1, 10, -1, 22, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [9, 10, 5, 6, 9, 6, 13, 10, -1, 6, 19, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [20, -1, 10, -1, -1, -1, 18, -1, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [11, 10, 11, 10, 15, 18, 15, 22, 19, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [18, -1, 6, -1, 10, -1, 22, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, 22, 13, 26, 15, 10, 19, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, -1, 18, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [15, 6, 5, 18, -1, 2, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, -1, 22, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [17, 34, 19, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [19, 2, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [21, -1, 7, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[22, 16, 12, 10, 8, 8, 6, 12, 8, 4, 4, 8, 12, 16, 14, 24, 10, 32, 6, 40, 2, 44], [16, 11, 10, 8, 10, 7, 8, 6, 4, 7, 4, 10, 8, 7, 12, 6, 16, 9, 20, 2, 64, 11], [12, 10, -1, 8, 8, -1, 8, 4, -1, 16, 4, -1, 6, 8, -1, 32, 12, -1, 2, 40, -1, -1], [10, 8, 8, -1, 10, 6, 4, -1, 18, 6, 4, -1, 24, 14, 8, -1, 32, 2, 28, -1, -1, -1], [8, 10, 8, 10, -1, 4, 6, 8, 6, -1, 4, 24, 14, 20, -1, 8, 2, -1, -1, -1, -1, -1], [8, 7, -1, 6, 4, -1, 12, 8, -1, 7, 4, -1, 20, 7, -1, 2, 16, -1, -1, -1, -1, -1], [6, 8, 8, 4, 6, 12, -1, 16, 8, 12, 4, 20, 10, -1, 2, 36, -1, 16, -1, -1, -1, -1], [12, 6, 4, -1, 8, 8, 16, -1, 12, 6, 4, -1, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1], [8, 4, -1, 18, 6, -1, 8, 12, -1, 8, 4, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [4, 7, 16, 6, -1, 7, 12, 6, 8, -1, 4, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [8, 10, -1, -1, 24, -1, 20, -1, -1, 2, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [12, 8, 6, 24, 14, 20, 10, 12, 2, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [16, 7, 8, 14, 20, 7, -1, 2, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, 12, -1, 8, -1, -1, 2, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [24, 6, 32, -1, 8, 2, 36, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, 16, 12, 32, 2, 16, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [32, 9, -1, 2, -1, -1, 16, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, 20, 2, 28, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [40, 2, 40, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, 64, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [44, 11, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[23, 16, 13, 10, 9, 10, 9, 6, 9, 18, 13, 22, 13, 18, 15, 14, 17, 10, 19, 6, 21, 2, 23], [16, -1, 10, -1, 10, -1, 6, -1, 14, -1, 14, -1, 10, -1, 26, -1, 6, -1, 38, -1, 2, -1, -1], [13, 10, -1, 10, 7, -1, 9, 10, -1, 20, 11, -1, 13, 6, -1, 26, 19, -1, 19, 2, -1, -1, -1], [10, -1, 10, -1, 10, -1, 10, -1, 6, -1, 6, -1, 18, -1, 30, -1, 18, -1, 2, -1, -1, -1, -1], [9, 10, 7, 10, -1, 6, 7, 6, 13, -1, 11, 14, 17, 26, -1, 14, 21, 2, -1, -1, -1, -1, -1], [10, -1, -1, -1, 6, -1, 10, -1, -1, -1, 22, -1, 18, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1], [9, 6, 9, 10, 7, 10, -1, 16, 15, 6, 11, 10, 15, -1, 19, 2, 55, -1, -1, -1, -1, -1, -1], [6, -1, 10, -1, 6, -1, 16, -1, 14, -1, 14, -1, 22, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [9, 14, -1, 6, 13, -1, 15, 14, -1, 10, 17, -1, 17, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [18, -1, 20, -1, -1, -1, 6, -1, 10, -1, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, 14, 11, 6, 11, 22, 11, 14, 17, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [22, -1, -1, -1, 14, -1, 10, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, 10, 13, 18, 17, 18, 15, 22, 17, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [18, -1, 6, -1, 26, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [15, 26, -1, 30, -1, -1, 19, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, -1, 26, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [17, 6, 19, 18, 21, 2, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [19, 38, 19, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [21, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[24, 16, 12, 12, 8, 8, 6, 16, 10, 8, 4, 4, 8, 12, 16, 20, 14, 28, 10, 36, 6, 44, 2, 48], [16, 12, 12, 8, 8, 6, 8, 8, 16, 4, 22, 4, 24, 8, 24, 12, 24, 6, 24, 20, 24, 2, 24, 24], [12, 12, 8, 8, 6, 6, 6, 16, 4, 16, 10, 4, 14, 16, 6, 16, 16, 12, 16, 16, 2, 16, 16, 16], [12, 8, 8, 6, 12, 6, 12, 4, 12, 10, 12, 4, 12, 12, 12, 8, 12, 12, 12, 2, 12, 12, 12, 12], [8, 8, 6, 12, -1, 8, 4, 16, 6, -1, 12, 4, 10, 28, -1, 20, 8, 24, 2, -1, -1, -1, -1, -1], [8, 6, 6, 6, 8, 4, 8, 8, 6, 6, 8, 4, 8, 8, 8, 8, 8, 2, 8, 8, 8, 8, 8, 8], [6, 8, 6, 12, 4, 8, -1, 16, 10, 20, 10, 4, 12, -1, 10, 20, 2, -1, 16, -1, -1, -1, -1, -1], [16, 8, 16, 4, 16, 8, 16, 3, 16, 8, 20, 4, 24, 12, 36, 2, 76, 36, -1, 16, -1, -1, -1, 3], [10, 16, 4, 12, 6, 6, 10, 16, -1, 12, 6, 4, 14, 32, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [8, 4, 16, 10, -1, 6, 20, 8, 12, -1, 8, 4, 24, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [4, 22, 10, 12, 12, 8, 10, 20, 6, 8, -1, 4, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [8, 24, 14, 12, 10, 8, 12, 24, 14, 24, 2, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [12, 8, 16, 12, 28, 8, -1, 12, 32, 2, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [16, 24, 6, 12, -1, 8, 10, 36, 2, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [20, 12, 16, 8, 20, 8, 20, 2, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, 24, 16, 12, 8, 8, 2, 76, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [28, 6, 12, 12, 24, 2, -1, 36, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, 24, 16, 12, 2, 8, 16, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [36, 20, 16, 2, -1, 8, -1, 16, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, 24, 2, 12, -1, 8, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [44, 2, 16, 12, -1, 8, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, 24, 16, 12, -1, 8, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [48, 24, 16, 12, -1, 8, -1, 3, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]], [[25, 18, 13, 10, 9, 12, 7, 6, 9, 14, 11, 24, 13, 22, 15, 18, 17, 14, 19, 10, 21, 6, 23, 2, 25], [18, -1, 10, -1, 10, -1, 14, -1, 6, -1, 14, -1, 18, -1, 10, -1, 30, -1, 6, -1, 42, -1, 2, -1, -1], [13, 10, -1, 8, 7, -1, 7, 14, -1, 10, 13, -1, 13, 26, -1, 6, 17, -1, 21, 30, -1, 2, -1, -1, -1], [10, -1, 8, -1, 10, -1, 6, -1, 14, -1, 18, -1, 6, -1, 14, -1, 34, -1, 22, -1, 2, -1, -1, -1, -1], [9, 10, 7, 10, 5, 10, 7, 10, 9, 4, 11, 18, 13, 22, 3, 26, 19, 30, 23, 2, 41, -1, -1, -1, 5], [12, -1, -1, -1, 10, -1, 6, -1, -1, -1, 14, -1, 26, -1, -1, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1], [7, 14, 7, 6, 7, 6, -1, 14, 15, 10, 17, 14, 15, -1, 19, 38, 21, 2, -1, -1, -1, -1, -1, -1, -1], [6, -1, 14, -1, 10, -1, 14, -1, 18, -1, 6, -1, 14, -1, 10, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1], [9, 6, -1, 14, 9, -1, 15, 18, -1, 14, 15, -1, 17, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, -1, 10, -1, 4, -1, 10, -1, 14, -1, 10, -1, 22, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [11, 14, 13, 18, 11, 14, 17, 6, 15, 10, -1, 6, 23, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [24, -1, -1, -1, 18, -1, 14, -1, -1, -1, 6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [13, 18, 13, 6, 13, 26, 15, 14, 17, 22, 23, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [22, -1, 26, -1, 22, -1, -1, -1, 14, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [15, 10, -1, 14, 3, -1, 19, 10, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [18, -1, 6, -1, 26, -1, 38, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [17, 30, 17, 34, 19, 14, 21, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [14, -1, -1, -1, 30, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [19, 6, 21, 22, 23, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [10, -1, 30, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [21, 42, -1, 2, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [6, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [23, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [25, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1]]] for i in range(0, o-1): for j in range(0, o-1): print(ans[o-5][i][j], end=' ') print('')