{"raw_statement":[{"iden":"problem statement","content":"Snuke is planning on giving one gift each to Takahashi and Aoki.  \nThere are $N$ candidates for the gifts. Takahashi's impression of the $i$\\-th candidate is $A_i$, and Aoki's impression of it is $B_i$.\nThe two are very jealous. If Takahashi's impression of the gift Aoki gets is greater than Takahashi's impression of the gift Takahashi gets, Takahashi gets jealous of Aoki and starts fighting, and vice versa.\nAmong the $N^2$ possible ways of giving the gifts, how many do not lead to fighting?"},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2\\times 10^5$\n*   $0 \\leq A_i \\leq 10^9$\n*   $0 \\leq B_i \\leq 10^9$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $\\ldots$ $A_N$\n$B_1$ $\\ldots$ $B_N$"},{"iden":"sample input 1","content":"3\n50 100 150\n1 3 2"},{"iden":"sample output 1","content":"4\n\nFor example, if we give the $1$\\-st candidate to Takahashi and the $2$\\-nd candidate to Aoki, Takahashi's impression of the gift Aoki gets is $100$, while Takahashi's impression of the gift Takahashi gets is $50$, so Takahashi gets jealous of Aoki and starts fighting.\nAs another example, if we give the $3$\\-rd candidate to Takahashi and the $2$\\-nd candidate to Aoki, the two will not start fighting.\nNote that it is allowed to give the same gift to the two."},{"iden":"sample input 2","content":"3\n123456789 123456 123\n987 987654 987654321"},{"iden":"sample output 2","content":"6"},{"iden":"sample input 3","content":"10\n3 1 4 1 5 9 2 6 5 3\n2 7 1 8 2 8 1 8 2 8"},{"iden":"sample output 3","content":"37"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}