UVA897 Anagrammatic Primes

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=10&page=show_problem&problem=838 [PDF](https://uva.onlinejudge.org/external/8/p897.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA897/dd2a042e5a9e6af7515093bcdb62f170ab426366.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA897/a1d627ff2d3ee460d636bbc4854659d28c25103c.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA897/d13a0bead9e31161abe95174635cd6aa3c9ad987.png)