CF817A.Treasure Hunt
普及-
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Captain Bill the Hummingbird and his crew recieved an interesting challenge offer. Some stranger gave them a map, potion of teleportation and said that only this potion might help them to reach the treasure.
Bottle with potion has two values x and y written on it. These values define four moves which can be performed using the potion:
Map shows that the position of Captain Bill the Hummingbird is (_x_1, _y_1) and the position of the treasure is (_x_2, _y_2).
You task is to tell Captain Bill the Hummingbird whether he should accept this challenge or decline. If it is possible for Captain to reach the treasure using the potion then output "YES", otherwise "NO" (without quotes).
The potion can be used infinite amount of times.
蜂鸟船长比尔和他的船员收到了一项有趣的挑战邀请。一位陌生人给了他们一张地图、一瓶传送药水,并称只有这瓶药水能帮助他们抵达宝藏。
药水瓶上标有两个数值 x 和 y,这两个数值定义了使用该药水可执行的四种移动方式:
地图显示:蜂鸟船长比尔的初始位置为 (x1,y1),宝藏的位置为 (x2,y2)。
你的任务是告诉蜂鸟船长比尔他是否应接受这项挑战。若船长能借助该药水抵达宝藏,则输出 "YES",否则输出 "NO"(不带引号)。
药水可无限次使用。
输入格式
The first line contains four integer numbers _x_1, _y_1, _x_2, _y_2 ( - 105 ≤ _x_1, _y_1, _x_2, _y_2 ≤ 105) — positions of Captain Bill the Hummingbird and treasure respectively.
The second line contains two integer numbers x, y (1 ≤ x, y ≤ 105) — values on the potion bottle.
第一行包含四个整数 x1, y1, x2, y2(−105≤x1, y1, x2, y2≤105),分别表示蜂鸟船长比尔与宝藏的位置。
第二行包含两个整数 x, y(1≤x, y≤105),表示药水瓶上的数值。
输出格式
Print "YES" if it is possible for Captain to reach the treasure using the potion, otherwise print "NO" (without quotes).
如果船长能够借助药水到达宝藏,则输出 “YES”,否则输出 “NO”(不带引号)。
输入输出样例
输入#1
0 0 0 6 2 3
输出#1
YES
输入#2
1 1 3 6 1 5
输出#2
NO
说明/提示
In the first example there exists such sequence of moves:
— the first type of move
— the third type of move
在第一个例子中,存在如下移动序列:
— 第一种类型的移动
— 第三种类型的移动
输入解题思路,AI测评打分。不知道怎么写?



