Arpa is taking a geometry exam. Here is the last problem of the exam.

You are given three points a, b, c.

Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old position of b, and the new position of b is the same as the old position of c.

Arpa is doubting if the problem has a solution or not (i.e. if there exists a point and an angle satisfying the condition). Help Arpa determine if the question has a solution or not.

Input

The only line contains six integers ax, ay, bx, by, cx, cy (|ax|, |ay|, |bx|, |by|, |cx|, |cy| ≤ 109). It's guaranteed that the points are distinct.

Output

Print "Yes" if the problem has a solution, "No" otherwise.

You can print each letter in any case (upper or lower).

Examples
input
0 1 1 1 1 0
output
Yes
input
1 1 0 0 1000 1000
output
No
Note

In the first sample test, rotate the page around (0.5, 0.5) by .

In the second sample test, you can't find any solution.

题意:三个点,从A B C找到一个圆形,通过旋转可以使得A到B这个位置,B到C这个位置

解法:

1 AB BC距离相等

2 大概想到是一个.....扇子..不能符合条件的只有三点共线的情况

 #include<bits/stdc++.h>
using namespace std;
struct Node{
long long x,y;
}node[];
long long dis(Node a,Node b){
return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);
}
int main(){
for(int i=;i<=;i++){
cin>>node[i].x>>node[i].y;
} long long a=(node[].x-node[].x)*(node[].y-node[].y);
long long b=(node[].y-node[].y)*(node[].x-node[].x);
if(a!=b&&(dis(node[],node[])==dis(node[],node[]))){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return ;
}

Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) B的更多相关文章

  1. D. Arpa and a list of numbers Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)

    http://codeforces.com/contest/851/problem/D 分区间操作 #include <cstdio> #include <cstdlib> # ...

  2. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)ABCD

    A. Arpa and a research in Mexican wave time limit per test 1 second memory limit per test 256 megaby ...

  3. Codeforces Round #432 (Div. 1, based on IndiaHacks Final Round 2017) D. Tournament Construction(dp + 构造)

    题意 一个竞赛图的度数集合是由该竞赛图中每个点的出度所构成的集合. 现给定一个 \(m\) 个元素的集合,第 \(i\) 个元素是 \(a_i\) .(此处集合已经去重) 判断其是否是一个竞赛图的度数 ...

  4. 【前缀和】【枚举倍数】 Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) D. Arpa and a list of numbers

    题意:给你n个数,一次操作可以选一个数delete,代价为x:或者选一个数+1,代价y.你可以进行这两种操作任意次,让你在最小的代价下,使得所有数的GCD不为1(如果全删光也视作合法). 我们从1到m ...

  5. 【推导】【暴力】Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) C. Five Dimensional Points

    题意:给你五维空间内n个点,问你有多少个点不是坏点. 坏点定义:如果对于某个点A,存在点B,C,使得角BAC为锐角,那么A是坏点. 结论:如果n维空间内已经存在2*n+1个点,那么再往里面添加任意多个 ...

  6. 【推导】Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) B. Arpa and an exam about geometry

    题意:给你平面上3个不同的点A,B,C,问你能否通过找到一个旋转中心,使得平面绕该点旋转任意角度后,A到原先B的位置,B到原先C的位置. 只要A,B,C构成等腰三角形,且B为上顶点.那么其外接圆圆心即 ...

  7. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) D

    Arpa has found a list containing n numbers. He calls a list bad if and only if it is not empty and g ...

  8. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) C

    You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two poi ...

  9. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) A

    Arpa is researching the Mexican wave. There are n spectators in the stadium, labeled from 1 to n. Th ...

随机推荐

  1. 纯CSS3实现淡入淡出下拉菜单

    纯CSS3实现淡入淡出下拉菜单是一款比较简单清新的CSS3教程下拉菜单,这款下拉菜单是垂直方向的,点击主菜单项可以展开和折叠子菜单,在展开折叠的过程中伴随着淡入淡出的动画效果 源代码:http://w ...

  2. 菜鸟快速自学java00之变量类型

    ---恢复内容开始--- 菜鸟快速自学java00之变量类型 一.诉苦 自己成为了Java中的一只菜鸟,而且已经菜了好多天了,我为什么会这么菜?归根结底,还是觉得自己在累计知识的同时,没有做好笔记,导 ...

  3. LNMP安装(二)

    PHP安装 1.yum安装一些依赖库 yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel ...

  4. 1095 Cars on Campus (30)(30 分)

    Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out time ...

  5. MySQL_杭州11月1-29号在线产品在线天数、销售天数_20161129

    杭州11月1-29号在线产品在线天数.销售天数 1.产品在这个时间段内的每一天的在线情况,然后聚合计算每个产品的在线天数,每一天的在线情况 如果在线记为1,不在线为null 2.计算每个产品在这个时间 ...

  6. 手工创建ASM Disk Groups、为 ASM Disk Groups 添加 disk

    Groups 添加 disk 创建语法说明: 必选参数: (1) 指定disk group 的唯一名称 (不分区大小写) (2) 指定disk group 的冗余级别对于ASM 的镜像冗余,可以指定3 ...

  7. Standby Redo Log 的设定原则、创建、删除、查看、归档位置

    设定: 1.每个standby redo log file 至少要和primary database的redo log 一样大,为了方便管理,Oracle 建议主备库的redo log 设置成一样的大 ...

  8. mysql备份并升级sql语句

    #!/bin/bash ' time=`date +%Y%m%d-%H%M` db_path=/root/code/xizang_PAD_project/PHP_business_server/tfc ...

  9. POJ3928(树状数组:统计数字出现个数)

    Ping pong Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2641   Accepted: 978 Descript ...

  10. 【转】Pro Android学习笔记(五):了解Content Provider(上)

    Content Provider是抽象数据封装和数据访问机制,例如SQLite是Android设备带有的数据源,可以封装到一个content provider中.要通过content provider ...