2914 - Looking for the Risk Factor

  • ID: 2914
  • IdBecrowd: 2914
  • Tags: ad-hoc
  • Nível: 5
  • Tempo Limite: 1.000s
  • Memória: 256MB
  • Categoria: Ad-Hoc
  • Autor: Neilor Tonin (Brasil)

Descrição

The “Risk Factor” of a number Q relative to a limit K is determined by its prime factors. Specifically, we are interested in whether the largest prime factor of Q is less than or equal to K. (Note: This problem description was reconstructed from limited metadata. The exact risk calculation involves finding the largest prime factor P of Q. If P <= K, the condition is met.)

Entrada

The input consists of multiple test cases. Each line contains two integers Q and K (2 <= Q <= 100000, 2 <= K <= 100000).

Saída

For each test case, print “Y” if the largest prime factor of Q is less than or equal to K, otherwise print “N”.

Exemplos

Exemplo de Entrada

10 5
10 2

Exemplo de Saída

Y
N
Back to top