Balloons

No attempts yetTime limit1sMemory limit128 MB

Problem

A group of children came to a toy store. Each of them wants to buy some balloons. The children like variety, so none of them wants to own two balloons of the same colour. In other words, all balloons bought by a single child must have different colours. Help the shop assistant decide whether every child's order can be filled from the store's current stock.

Write a program that:

  • reads the store's stock and the children's orders from standard input,
  • checks whether all children can be satisfied,
  • writes the result to standard output.

Input

The first line contains two integers nn and mm (1n2000001 \le n \le 200000, 2m2000002 \le m \le 200000), separated by a single space, where nn is the number of distinct balloon colours in the store and mm is the number of children.

The second line contains nn integers aia_i (1ai10000001 \le a_i \le 1000000), separated by spaces, giving the stock of each colour.

The third line contains mm integers bib_i (1bi10000001 \le b_i \le 1000000), separated by spaces, giving the children's orders. bi=kb_i = k means the ii-th child wants to buy kk balloons, all of different colours.

Output

Print TAK (Polish for yes) on the only line if every child's order can be filled, and NIE (Polish for no) otherwise.