PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000104. Cặp số nguyên tố sinh đôi thứ S (Twin Primes)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Cặp số nguyên tố sinh đôi thứ S (Twin Primes)

Twin Primes

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

Primes pp and p+2p+2 form a twin prime pair. Order all pairs by increasing first prime pp; the first three are (3,5)(3,5), (5,7)(5,7), and (11,13)(11,13). Given a 1-based pair index SS, find the pair at this position.

Input

One line contains the 1-based index SS.

Output

Print a single line exactly as (p, q), with one space after the comma and q=p+2q=p+2.

Subtasks

  • Subtask 1 (20 points): 1≤S≤1001\le S\le 100.
  • Subtask 2 (30 points): 1≤S≤100001\le S\le 10000.
  • Subtask 3 (50 points): 1≤S≤1000001\le S\le 100000.

Examples

Input

3

Output

(11, 13)

Explanation

The first, second, and third pairs are (3,5)(3,5), (5,7)(5,7), and (11,13)(11,13). Thus S=3S=3 corresponds to (11, 13).