8114613 - [COCI2017-2018#5] Olivander

通过次数

1

提交次数

2

时间限制 : 1 秒
内存限制 : 128 MB

Harry Potter has damaged his magic wand in a fight with Lord Voldemort. He has decided to get a new wand in Olivander's wand shop. On the floor of the shop, he saw ​N wands and ​N wand boxes. The lengths of the wands are, respectively, X1​ ,X2​ ...Xn​ , and the box sizes areY1​ Y2​ ...Yn​ . A wand of length ​X can be placed in a box of size ​Y if ​X ≤ ​Y . Harry wants to know if he can place all the wands in boxes so that each box contains exactly one wand. Help him solve this difficult problem.

输入

The first line of input contains the positive integer ​N (1 ≤ ​N ≤ 100), the number from the task. The second line contains ​N positive integers ​Xi​ (1 ≤ ​Xi​ ≤ 10^9 ), the numbers from the task. The third line contains ​N positive integers ​X_iXi​ (1 ≤ Xi​ ≤ 10^91), the numbers from the task.

输出

If Harry can place all the wands in boxes, output “DA” (Croatian for yes), otherwise output “NE” (Croatian for no).

样例

输入

3
7 9 5
6 13 10

输出

DA

输入

4
5 3 3 5
10 2 10 10

输出

NE

输入

4
5 2 3 2
3 8 3 3

输出

DA