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

#GL0000318. Hai đèn nhấp nháy (Das Blinkenlights)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Hai đèn nhấp nháy (Das Blinkenlights)

Das Blinkenlights

Source: Kattis

Version: Phuoc Hung OJ Extended

Problem Statement

Two lights blink at regular time intervals. Both are off at time t=0t=0. The first blinks at times p,2p,3p,…p,2p,3p,\ldots seconds and the second at q,2q,3q,…q,2q,3q,\ldots seconds. Each blink is instantaneous and does not toggle the light's state.

Given a patience limit of ss seconds, determine whether both lights blink together at an integer time tt in the inclusive interval 1≤t≤s1\le t\le s.

Input

One line contains integers p,q,sp,q,s: the two blinking periods (in seconds) and the patience limit (in seconds).

Output

Print exactly yes if the lights blink together in time, or no otherwise, in lowercase.

Subtasks

  • Subtask 1 (20 points): 1≤p,q≤101\le p,q\le10; 1≤s≤1001\le s\le100.
  • Subtask 2 (30 points): 1≤p,q≤501\le p,q\le50; 1≤s≤20001\le s\le2000.
  • Subtask 3 (50 points): 1≤p,q≤1001\le p,q\le100; 1≤s≤100001\le s\le10000.

Examples

Example 1

Input

2 5 20

Output

yes

Explanation

The first blinks at even multiples of 22, and the second at multiples of 55. Both blink at t=10≤20t=10\le20.

Example 2

Input

4 3 11

Output

no

Explanation

The first common blink is at lcm⁡(4,3)=12>11\operatorname{lcm}(4,3)=12>11.