There are N computers and N sockets in a one-dimensional world. The coordinate of the i-th computer is a_i, and the coordinate of the i-th socket is b_i. It is guaranteed that these 2N coordinates are pairwise distinct.

Snuke wants to connect each computer to a socket using a cable. Each socket can be connected to only one computer.

In how many ways can he minimize the total length of the cables? Compute the answer modulo 10^9+7.

Constraints

* 1 ≤ N ≤ 10^5
* 0 ≤ a_i, b_i ≤ 10^9
* The coordinates are integers.
* The coordinates are pairwise distinct.

Input

The input is given from Standard Input in the following format:


N
a_1
:
a_N
b_1
:
b_N


Output

Print the number of ways to minimize the total length of the cables, modulo 10^9+7.

Examples

Input

2
0
10
20
30


Output

2


Input

3
3
10
8
7
12
5


Output

1
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class Main {

    static int N;
    static int[] A;
    static int[] B;

    static int MOD = 1_000_000_007;

    public static void main(String[] args) {
        FastScanner sc = new FastScanner(System.in);
        N = sc.nextInt();
        A = sc.nextIntArray(N);
        B = sc.nextIntArray(N);
        System.out.println( solve() );
    }

    static long solve() {
        Arrays.sort(A);
        Arrays.sort(B);

        long ans = 1;
        int ai = 0;
        int bi = 0;
        int ab = 0;
        while(ai < N || bi < N) {
            if( bi == N || (ai != N) && A[ai] < B[bi] ) {
                if( ab < 0 ) {
                    ans = ans * -ab % MOD;
                }
                ai++;
                ab++;

            } else {
                if( ab > 0 ) {
                    ans = ans * ab % MOD;
                }
                bi++;
                ab--;
            }
        }

        return ans;
    }

    @SuppressWarnings("unused")
    static class FastScanner {
        private BufferedReader reader;
        private StringTokenizer tokenizer;
        FastScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
            tokenizer = null;
        }
        String next() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        String nextLine() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    return reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken("\n");
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
        long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
    }
}