Calculate integer

TimeLimit:1000MS  MemoryLimit:128MB
64-bit integer IO format:%lld
未提交 | 登录后收藏
Problem Description

Given two integers k and L, determine whether there is a positive integer n that satisfies kn= L.

Input

The first line contains the integer T, indicating that there are T groups of test data.

Each group of data has two rows, the first row contains the integer k and the second row contains the integer L.

(1≤T≤10,1≤k, L≤231−1)

Output

Output one line of results for each set of data, YES if there is n, NO otherwise.

SampleInput
2
5
25
3
8
SampleOutput
YES
NO
Submit
题目统计信息详细
总AC数19
通过人数17
尝试人数17
总提交量38
AC率44.74%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签
作者

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: