题目描述
Problem Description
Nagisa, the secretary of Takahashi, loves him very much. Today, she decided to call him. To her surprise, she heard a woman's voice in the background besides Takahashi's.
Although Nagisa is not dating Takahashi, she decided to investigate his infidelity because it would be terrible if he got involved with the wrong person.
Using an application she installed on Takahashi's phone, she obtained his location via GPS. She found out that before the call, Takahashi was at coordinates $ (tx_a, ty_a) $, and after the call, he was at coordinates $ (tx_b, ty_b) $. The time taken during this period was $ T $ minutes. Takahashi can move at a maximum speed of $ V $ per minute and can move at this speed ignoring obstacles like houses.
Nagisa decided to investigate whether Takahashi might have stopped by a girl's house in the neighborhood. There are $ n $ girls in the neighborhood, each living at coordinates $ (x_i, y_i) $.
Output YES if there is even a slight possibility that Takahashi stopped at another girl's house, otherwise output NO.
Input Format
The input is given from the standard input in the following format:
$ tx_a $ $ ty_a $ $ tx_b $ $ ty_b $ $ T $ $ V $ $ n $ $ x_1 $ $ y_1 $ $ x_2 $ $ y_2 $ : $ x_n $ $ y_n $
- The first line contains integers representing Takahashi's coordinates before the call $tx_a, ty_a\ (0 ≦ tx_a, ty_a ≦ 1000)$, his coordinates after the call $tx_b, ty_b\ (0 ≦ tx_b, ty_b ≦ 1000)$, the time taken $T\ (1 ≦ T ≦ 50)$, and his speed per minute $V\ (1 ≦ V ≦ 100)$, all separated by spaces.
- The second line contains the number of girls to be investigated $n\ (1 ≦ n ≦ 1000)$.
- The following $ n $ lines contain the coordinates of the girls' houses. The $ i $-th line contains integers $x_i, y_i\ (0 ≦ x_i, y_i ≦ 1000)$ representing the coordinates of the $ i $-th girl's house.
- It is guaranteed that Takahashi would not take longer than $ T $ minutes to move directly from $ (tx_a, ty_a) $ to $ (tx_b, ty_b) $ at speed $ V $.
Output Format
Output YES if it is possible for Takahashi to have stopped at another girl's house, otherwise output NO. End the output with a newline.
Sample Input and Output
Sample Input #1
1 1 8 2 2 4
1
4 5
Sample Output #1
NO
Sample Input #2
1 1 8 2 2 6
1
4 5
Sample Output #2
YES
Sample Input #3
1 1 8 2 2 5
1
4 5
Sample Output #3
YES
Sample Input #4
7 7 1 1 3 4
3
8 1
1 7
9 9
Sample Output #4
YES
Notes/Hints
Sample Explanation 1
Consider whether Takahashi could have stopped at the house at $ (4,5) $ when moving from $ (1,1) $ to $ (8,2) $.
- The distance from $ (1,1) $ to $ (4,5) $ is $\sqrt{(4-1)^2 + (5-1)^2} = 5$.
- The distance from $ (4,5) $ to $ (8,2) $ is $\sqrt{(8-4)^2 + (2-5)^2} = 5$.
The total distance is 10. Takahashi can only move 8 at a speed of 4 per minute in 2 minutes. Therefore, it is impossible for him to have stopped at this house, so output NO.
Sample Explanation 2
Same configuration as Sample Input 1, but Takahashi's speed is now 6. Since he can move up to 12, it is now possible for him to stop at the house. Therefore, output YES.
Sample Explanation 3
Even if the movement is exactly possible, it is still possible for him to have stopped, so output YES.
Sample Explanation 4
Only the second girl's house is possible for him to stop at.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分