http://codeforces.com/problemset/problem/101/C
#include<bits/stdc++.h>
using namespace std;
long long xa,ya,xb,yb,xc,yc;
long long o;
bool check(long long xa,long long ya)
{
if (!o) return xa==xb&&ya==yb;
return ((xb-xa)*xc+(yb-ya)*yc)%o==0&&((xb-xa)*yc-(yb-ya)*xc)%o==0;
}
int main()
{
scanf("%I64d %I64d %I64d %I64d %I64d %I64d",&xa,&ya,&xb,&yb,&xc,&yc);
o=xc*xc+yc*yc;
bool flag=check(xa,ya)||check(ya,-xa)||check(-ya,xa)||check(-xa,-ya);
if(flag)
printf("YES\n");
else
printf("NO\n");
}
/*
因为可以旋转,所以可以得到
k1(xc,yc)+k2(-yc,xc)=(vx,vy)
==>>k1*xc-k2*yc=vx; k1*yc+k2*xc=vy;
==>>k1=(xc*vx+yc*vy)/(xc^2+yc^2);k2=(xc*vy-yc*vx)/(xc^2+yc^2);
k1,k2 为整数
A向量可以旋转,有四个方向(x,y)=(xa,ya)(-ya,xa)(-xa,-ya)(ya,-xa);
(vx,vy)=(xb,yb)-(x,y);
*/