Universal Cup Judging System

Universal Cup

Límite de tiempo: 3.0 s Límite de memoria: 1024 MB Puntuación total: 100 Hackeable ✓
Estadísticas

$\phi(n)$은 오일러 피 함수, 즉 $[1,n]$에 속하는 정수 중 $n$과 서로소인 정수의 개수를 나타낸다.

$r \ge \frac{5\ell}{3}$을 만족하는 두 정수 $\ell$과 $r$이 주어진다. $\ell \le x,y \le r$이고 $\phi(x)=\phi(y)$를 만족하는 서로 다른 두 정수 $x$와 $y$를 찾거나, 그러한 쌍이 존재하지 않음을 보고하라.

입력

첫째 줄에는 테스트 케이스의 개수인 정수 $t$ ($1 \le t \le 20$)가 주어진다.

다음 $t$개의 줄에는 각각 하나의 테스트 케이스를 나타내는 두 정수 $\ell$과 $r$ ($1 \le \ell < r \le 10^{17}$)이 주어진다. $r \ge \frac{5\ell}{3}$임이 보장된다.

출력

각 테스트 케이스에 대해 $\phi(x)=\phi(y)$를 만족하는 두 정수 $x$와 $y$ ($\ell \le x,y \le r$, $x \ne y$)를 출력하거나, 그러한 쌍이 존재하지 않으면 -1 -1을 출력하라. 유효한 쌍이 여러 개라면 그중 아무거나 하나를 출력하라.

예제

입력 1

5
1 3
5 10
15 30
21 50
50 100

출력 1

1 2
5 8
15 16
21 26
52 56

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.