Minimaximal matching
Given the complete bipartite graph. Each part of this graph has N vertices, i.e. the graph is balanced. An integer number (called a weight) assigns to each vertex. The weight of the edge is defined as a product of weights of vertices which connected by this edge.
Is is well known, a matching in a graph is a set of edges without common vertices. A matching is perfect, if it covers all vertices of a graph, i.e. each graph vertex is incident to some edge of matching.
Your task is to find a perfect minimaximal matching, i.e. such matching, that maximal weight of matching edges would be minimal. (as less as possible).
Input
The first line of the input file contains integer number N (1 ≤ N ≤ 10^5). The second line consist of N integer numbers, not exceeded 10^9 by absolute value. The i-th number in line denotes a weight of i-th vertex of first part of a graph. In the third line, weights of vertices of second part are presented. Vertices of each part have numbers from 1 to N.
Output
On the first line of output file output the weight of perfect minimaximal matching, i.e. the maximal weight of its edges. The second line should contains a description of this matching in the form of N integer numbers. i-th number denotes a number of vectex in second part, which connected with i-th vertex in first part by a matching edge.