import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        long ax = in.nextInt();
        long ay = in.nextInt();
        long bx = in.nextInt();
        long by = in.nextInt();
        long cx = in.nextInt();
        long cy = in.nextInt();

        long ab_sq = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
        long bc_sq = (cx - bx) * (cx - bx) + (cy - by) * (cy - by);

        if (ab_sq == bc_sq) {
            if ((cy - ay) * (bx - ax) != (cx - ax) * (by - ay)) {
                p("YES");
                return;
            }
        }
        p("NO");
    }

    static void p(Object str) {
        System.out.println(str);
    }

    public static void pa(int[] objs) {
        String str = "";
        for (Object obj : objs) {
            str += obj.toString() + " ";
        }
        p(str);
    }

    public static void pi(Object[] objs) {
        String str = "";
        for (Object obj : objs) {
            str += obj.toString() + " ";
        }
        p(str);
    }

}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

 public static boolean isStraight(long x1,long y1,long x2,long y2,long x3,long y3)
 {
     long slope1=(y2-y1)*(x3-x2);
     long slope2=(y3-y2)*(x2-x1);
     if(slope1!=slope2)
         return false;
     else
         return true;
 }
 public static void main(String[] args) {
     try{
         Scanner s1 = new Scanner(System.in);
         long x1=s1.nextLong();
         long y1=s1.nextLong();
         long x2=s1.nextLong();
         long y2=s1.nextLong();
         long x3=s1.nextLong();
         long y3=s1.nextLong();
         long dist1=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
         long dist2=(x2-x3)*(x2-x3)+(y2-y3)*(y2-y3);
         if((isStraight(x1,y1,x2,y2,x3,y3)) ||(dist1!=dist2))
             System.out.println("No");
         else
             System.out.println("Yes");
     }
     catch(Exception e)
     {}

   }
}

import java.util.*;

public class Test2 {
	public static void main(String[] args) {
	    Scanner in = new Scanner(System.in);
	    String input = in.nextLine();
		String[] strs = input.trim().split(" ");
		long[] ins = new long[strs.length];

		for (int i = 0; i < strs.length; i++) {
			ins[i] = Long.parseLong(strs[i]);
		}

		boolean b1 = false;
		boolean b2 = false;
		boolean b3 = false;
		boolean ans;

		long x1 = ins[0];
		long y1 = ins[1];
		long x2 = ins[2];
		long y2 = ins[3];
		long x3 = ins[4];
		long y3 = ins[5];

		long d1 = ((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1));
        long d2 = ((x3 - x2) * (x3 - x2)) + ((y3 - y2) * (y3 - y2));
        if(((y3 - y2) * (x2 - x1)) != ((y2 - y1) * (x3 - x2))) b1 = true;
        if(((y3 - y1) * (x1 - x2)) != ((y1 - y2) * (x3 - x1))) b2 = true;
        if(((y2 - y3) * (x3 - x1)) != ((x2 - x3) * (y3 - y1))) b3 = true;

        ans = (b1 & b2 & b3);
        ans &= (d1 == d2);
        System.out.println( ans ? "Yes" : "No");
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;

public class B {
	public static void main(String[] args) throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		FastScanner in = new FastScanner(System.in);

		int [] a= new int[2];
		int [] b= new int[2];
		int [] c= new int[2];
		for (int i = 0; i < 2; i++) {
			a[i]= in.nextInt();
		}
		for (int i = 0; i < 2; i++) {
			b[i]= in.nextInt();
		}
		for (int i = 0; i < 2; i++) {
			c[i]= in.nextInt();
		}

		long d1= dist(a[0],a[1], b[0], b[1]);
		long d2= dist(c[0],c[1], b[0], b[1]);
		//System.out.println(d1+" "+ d2);
		//System.out.println(cross(a,b,c));
		if(d1==d2&&cross(a,b,c)!=0){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}

	}
	public static long dist(int x1, int y1, int x2, int y2){
		long xx= (long) (x2-x1)*(x2-x1);
		long yy= (long) (y2-y1)*(y2-y1);
		return xx+yy;
	}
	public static long cross(int[] A, int[] B, int[] C){
        int [] AB = new int[2];
        int [] AC = new int[2];
        AB[0] = B[0]-A[0];
        AB[1] = B[1]-A[1];
        AC[0] = C[0]-A[0];
        AC[1] = C[1]-A[1];
        long cross = (long) AB[0] * AC[1] - (long) AB[1] * AC[0];
        return cross;
    }

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

		public String next() throws IOException {
			if (!st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
				return next();
			}
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
}

/*
ID: andrew42
LANG: JAVA
TASK:
PROG:
*/

import java.io.*;
import java.util.*;
import java.lang.*;

public class arpageo {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		long ax = input.nextLong(); long ay = input.nextLong(); long bx = input.nextLong(); long by = input.nextLong(); long cx = input.nextLong(); long cy = input.nextLong();
		long numer = cy-by; long denom = cx-bx;
		long num = numer; long den = denom;
		boolean line = false;
		if (den == 0 || num == 0){
			if (den == 0){
				line = ax == bx;
			} else {
				line = ay == by;
			}
		} else {
			while (num%den != 0){
				long n = den;
				den = num%den;
				num = n;
			}
			numer /= den; denom /= den;
			line = -numer*ax+denom*ay == -numer*bx + denom*by;
		}
		System.out.println((bx-ax)*(bx-ax)+(by-ay)*(by-ay) == (bx-cx)*(bx-cx)+(by-cy)*(by-cy) && !line ? "Yes" : "No");
	}
}

import java.util.*;
public final class Round431 {
		public static void main(String args[]){
			Scanner sc = new Scanner(System.in);
			long ax = sc.nextInt();
			long ay = sc.nextInt();
			long bx = sc.nextInt();
			long by = sc.nextInt();
			long cx = sc.nextInt();
			long cy = sc.nextInt();
			//float c=(cx*cx)+(cy*cy);
			long a=(ax-bx)*(ax-bx)+(ay-by)*(ay-by);
			long b=(bx-cx)*(bx-cx)+(by-cy)*(by-cy);

//			System.out.println(a+" "+b+" "+c);
//			float p=(b-a)/2;
//			float q=(b-c)/2;
//			float X=(q-p*(by-ay))/(ax-cx);
//			float Y=p-X*(bx-ax);
//			System.out.println(X+" "+Y);
//			float m1m2 = ((ay-Y)*(cy-Y)*(by-Y))/((ax-X)*(cx-X)*(bx-X));
//			System.out.println(m1m2);
			if(a==b && ((by-ay)*(cx-bx)!=(cy-by)*(bx-ax)))
					System.out.println("Yes");

			else
					System.out.println("No");
			sc.close();
		}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;

public class B {

    static PrintWriter out = new PrintWriter(System.out);
    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{
        String[] ar= reader.readLine().split(" ");
        long ax = Long.valueOf(ar[0]);
        long ay = Long.valueOf(ar[1]);
        long bx = Long.valueOf(ar[2]);
        long by = Long.valueOf(ar[3]);
        long cx = Long.valueOf(ar[4]);
        long cy = Long.valueOf(ar[5]);

        if (    judge(ax, ay, bx, by, cx, cy)
//                judge(cx, cy, bx, by, ax, ay) ||
//                judge(ax, ay, cx, cy, bx, by) ||
//                judge(bx, by, cx, cy, ax, ay) ||
//                judge(cx, cy, ax, ay, bx, by) ||
//                judge(bx, by, ax, ay, cx, cy)
                ) System.out.println("Yes");
        else System.out.println("No");
    }

    static boolean judge(long ax, long ay, long bx, long by, long cx, long cy){
        long a = ay - by, b = ax - bx, c = cy - by , d = cx - bx;
        if (a * a + b * b != c * c + d *d){
            return false;
        }
        long dx = bx + bx - ax;
        long dy = by + by - ay;
        return !(dx == cx && dy == cy);
        //        if(b != 0 && d != 0) {
//            if (a / b == c / d && a % b == c % d) {
//                return false;
//            }
//            return true;
//        }
//        if (ay != by || by != cy) return true;
//        return false;
    }
}

import java.util.*;
import java.io.*;
import java.math.*;
import java.util.regex.*;

public class Main {

    static Scanner input = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    static Reader fastInput = new Reader();

    public static void main(String[] args) throws IOException {
        long ax = input.nextLong();
        long ay = input.nextLong();
        long bx = input.nextLong();
        long by = input.nextLong();
        long cx = input.nextLong();
        long cy = input.nextLong();
        boolean acbcEQ = (ax * ax + ay * ay - 2 * (ax * bx + ay * by) == cx * cx + cy * cy - 2 * (bx * cx + by * cy));
        boolean nonCoplan = ((by - ay) * (cx - ax) != (cy - ay) * (bx - ax));
        if (nonCoplan && acbcEQ) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    static class Reader {

        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg) {
                return -ret;
            }
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg) {
                return -ret;
            }
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }

            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg) {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null) {
                return;
            }
            din.close();
        }
    }
}

import java.util.Scanner;

public class B851GeometryTest {

	public static class mPoint {
		public long x, y;
		public mPoint(long a, long b) {
			x = a;
			y = b;
		}
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		mPoint a = new mPoint(in.nextLong(), in.nextLong());
		mPoint b = new mPoint(in.nextLong(), in.nextLong());
		mPoint c = new mPoint(in.nextLong(), in.nextLong());

		if (a.x - b.x == 0 && b.x - c.x == 0) {
			System.out.println("No");
		} else if (a.x - b.x == 0 || b.x - c.x == 0) {
			if (equidis(a, b, c)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else if ((b.y - c.y) * (a.x - b.x) == (a.y - b.y) * (b.x - c.x)) {
			System.out.println("No");
		} else if (equidis(a, b, c)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

	public static boolean equidis(mPoint a, mPoint b, mPoint c) {
		return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y) ==
			   (b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y);
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Solutions {

	public static PrintWriter writer;

	public static final int NMAX = 200001;
	public static final double EPS = 1E-6;

	public static long dist2(long x1, long y1, long x2, long y2) {
		return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
	}

	public static void main(String[] args) throws IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		writer = new PrintWriter(System.out);

		String[] s = reader.readLine().split(" ");
		long[] x = new long[3];
		long[] y = new long[3];
		for (int i = 0; i < 3; i++) {
			x[i] = Long.parseLong(s[i * 2]);
			y[i] = Long.parseLong(s[i *2 + 1]);
		}

		long d1 = dist2(x[0], y[0], x[1], y[1]);
		long d2 = dist2(x[2], y[2], x[1], y[1]);
		//writer.println(d1 + " " + d2);
		//writer.println((x[0] - x[1])*(y[2] - y[1]));
		//writer.println((x[2] - x[1])*(y[0] - y[1]));
		if(d1 == d2) {
			if((x[0] - x[1])*(y[2] - y[1]) != (x[2] - x[1])*(y[0] - y[1])) {
				writer.println("Yes");
			}else {
				writer.println("No");
			}
		}else {
			writer.println("No");
		}

		reader.close();
		writer.close();
	}

}

import java.util.*;
import java.io.*;
public class Program {
    public static void main (String[] args)
    {
        Scanner sc=  new Scanner(System.in);
        OutputWriter out = new OutputWriter(System.out);
        long ax = sc.nextLong();
        long ay = sc.nextLong();
        long bx = sc.nextLong();
        long by = sc.nextLong();
        long cx = sc.nextLong();
        long cy =sc.nextLong();

        boolean check1 = false;
        boolean check2 = false;
        long g1 = (ax-bx)*(ax-bx);
        long g2 = (ay-by)*(ay-by);
        long h1 = (cy-by)*(cy-by);
        long h2 = (cx-bx)*(cx-bx);
        long dist1 = g1+g2;
        long dist2 = h1+h2;
        double slop1=1;
        double slop2 =1;
        if (dist1==dist2)
            check1 = true;
            slop1 = (double) (ay - by) /(ax - bx);
            slop2 = (double)(by - cy) /(bx - cx);
        if ( slop1!=slop2)
            check2 = true;
        if (check1&&check2)
            out.printLine("Yes");
        else
            out.printLine("No");
        out.flush();
    }

    static    void merge(long arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[] = new long [n1];
        long R[] = new long [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    static   void sort(long arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle polong
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public String next() {
        return readString();
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class B {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] arr = br.readLine().split(" ");
		long ax = Integer.parseInt(arr[0]);
		long ay = Integer.parseInt(arr[1]);
		long bx = Integer.parseInt(arr[2]);
		long by = Integer.parseInt(arr[3]);
		long cx = Integer.parseInt(arr[4]);
		long cy = Integer.parseInt(arr[5]);
		long distAB = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
		long distBC = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
		if (distAB != distBC) {
			System.out.println("No");
		} else {
			long dxab = bx - ax;
			long dyab = by - ay;
			long dxbc = cx - bx;
			long dybc = cy - by;
			if (dxab == dxbc && dyab == dybc) {
				System.out.println("No");
			} else {
				System.out.println("Yes");
			}
		}
		br.close();
	}

}

import java.io.*;
import java.util.*;

public class Ques2 {

    static class Scan {

        private final InputStream inputStream;
        private final byte[] buffer = new byte[1024];
        private int currentChar;
        private int numChars;
        private SpaceCharFilter filter;

        public Scan() {
            inputStream = System.in;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (currentChar >= numChars) {
                currentChar = 0;
                try {
                    numChars = inputStream.read(buffer);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buffer[currentChar++];
        }

        public String nextLine() {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String str = "";

            try {
                str = br.readLine();
            }
            catch (IOException e) {
            }
            return str;
        }

        public int nextInt() {
            int ch = read();

            while(isSpaceChar(ch))
                ch = read();

            int sgn = 1;

            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            int res = 0;
            do {
                if(ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res * sgn;
        }

        public long nextLong() {
            int ch = read();

            while (isSpaceChar(ch))
                ch = read();

            int sgn = 1;

            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            long res = 0;

            do {
                if (ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res * sgn;
        }

        public double nextDouble() {
            int ch = read();

            while (isSpaceChar(ch))
                ch = read();

            int sgn = 1;
            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            double res = 0;
            while (!isSpaceChar(ch) && ch != '.') {
                if (ch == 'e' || ch == 'E')
                    return res * Math.pow(10, nextInt());
                if (ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            if (ch == '.') {
                ch = read();
                double m = 1;
                while (!isSpaceChar(ch)) {
                    if (ch == 'e' || ch == 'E')
                        return res * Math.pow(10, nextInt());
                    if (ch < '0' || ch > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (ch - '0') * m;
                    ch = read();
                }
            }

            return res * sgn;
        }

        public String readString() {
            int ch = read();
            while (isSpaceChar(ch))
                ch = read();

            StringBuilder res = new StringBuilder();

            do {
                res.appendCodePoint(ch);
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res.toString();
        }

        public boolean isSpaceChar(int ch) {
            if (filter != null)
                return filter.isSpaceChar(ch);
            return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t' || ch == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static class Print {
        private final BufferedWriter bw;

        public Print() {
            this.bw=new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void print(Object object)throws IOException {
            bw.append(""+object);
        }

        public void println(Object object)throws IOException {
            print(object);
            bw.append("\n");
        }

        public void close()throws IOException {
            bw.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Scan sc = new Scan();
        Print pr = new Print();

        long ax, ay, bx, by, cx, cy;
        ax=sc.nextInt();
        ay=sc.nextInt();
        bx=sc.nextInt();
        by=sc.nextInt();
        cx=sc.nextInt();
        cy=sc.nextInt();

        long ab, bc, ac;

        ab = (ax-bx)*(ax-bx) + (ay-by)*(ay-by);
        bc = (bx-cx)*(bx-cx) + (by-cy)*(by-cy);
        ac = (ax-cx)*(ax-cx) + (ay-cy)*(ay-cy);

        double arr[] = new double[3];
        arr[0]=ab;
        arr[1]=bc;
        arr[2]=ac;

        Arrays.sort(arr);

        if((ay-by)*(bx-cx)==(by-cy)*(ax-bx))
            pr.println("No");
        else if(ab==bc)
            pr.println("Yes");
        else
            pr.println("No");

        pr.close();

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;

public class round {
	public static boolean acute(vect v1, vect v2) {
		return v1.a * v2.a + v1.b * v2.b + v1.c * v2.c + v1.d * v2.d + v1.e * v2.e > 0;
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int ax = sc.nextInt();
		int ay = sc.nextInt();
		int bx = sc.nextInt();
		int by = sc.nextInt();
		int cx = sc.nextInt();
		int cy = sc.nextInt();
		long vp = 1l * (bx - ax) * (by - cy) - 1l * (by - ay) * (bx - cx);
		if (vp != 0 && dis(ax - bx, ay - by) == dis(bx - cx, by - cy))
			System.out.println("Yes");
		else
			System.out.println("No");
	}

	static long dis(int x, int y) {
		return 1l * x * x + 1l * y * y;
	}

	static class vect {
		int a, b, c, d, e;

		public vect(int x1, int x2, int x3, int x4, int x5) {
			a = x1;
			b = x2;
			c = x3;
			d = x4;
			e = x5;
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int countTokens() throws IOException {
			while (st == null || !st.hasMoreTokens() || st.countTokens() == 0)
				st = new StringTokenizer(br.readLine());
			return st.countTokens();
		}

		public boolean nextEmpty() throws IOException {
			String s = nextLine();
			st = new StringTokenizer(s);
			return s.isEmpty();
		}
	}
}

import java.util.Scanner;

/**
 * Created by Pranav ps on 04-09-2017.
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long ax = sc.nextInt();
        long ay = sc.nextInt();
        long bx = sc.nextInt();
        long by = sc.nextInt();
        long cx = sc.nextInt();
        long cy = sc.nextInt();
        boolean ans = ((cy-by)*(bx-ax) != (by-ay)*(cx-bx)) && ((cy-by)*(cy-by) + (cx-bx)*(cx-bx) == (by-ay)*(by-ay) + (bx-ax)*(bx-ax));
        if(!ans)
            System.out.println("No");
        else
            System.out.println("Yes");
    }
}

import java.util.Collections;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Arrays;

public class Main {
  public static Scanner scanner = new Scanner(System.in);

  public static double distance(int ax, int ay, int bx, int by) {
	return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay,2));
  }

  public static double slope(int ax, int ay, int bx, int by) {
    double top = by - ay;
    double down = bx - ax;
    return top/down;
  }

  public static void main(String[] args) {

    long x1,y1,x2,y2,x3,y3,k1,k2,d1,d2;
    while(scanner.hasNext()) {
      x1 = scanner.nextInt();
      y1 = scanner.nextInt();
      x2 = scanner.nextInt();
      y2 = scanner.nextInt();
      x3 = scanner.nextInt();
      y3 = scanner.nextInt();
      d1=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
      d2=(x2-x3)*(x2-x3)+(y2-y3)*(y2-y3);
      if(d1!=d2) System.out.println("NO");
      else if((x2-x3)*(y1-y2)==(x1-x2)*(y2-y3)){
        System.out.println("NO");
      }
      else System.out.println("YES");
    }
  }
}

import java.util.Scanner;

public final class Main {

	public static long distSq(int x1, int y1, int x2, int y2) {
		long a = (x2 - x1);
		long b = (y2 - y1);
		// System.out.println(a * a + " " + b * b);
		return a * a + b * b;
	}

	public static boolean isLine(long x1, long y1, long x2, long y2, long x3, long y3) {
		return (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) == 0;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ax = sc.nextInt();
		int ay = sc.nextInt();
		int bx = sc.nextInt();
		int by = sc.nextInt();
		int cx = sc.nextInt();
		int cy = sc.nextInt();
		sc.close();

		// System.out.println(distSq(ax, ay, bx, by));
		// System.out.println(distSq(bx, by, cx, cy));

		if (distSq(ax, ay, bx, by) != distSq(bx, by, cx, cy) || isLine(ax, ay, bx, by, cx, cy)) {
			System.out.println("No");
		} else {
			System.out.println("Yes");
		}
	}
}

/*

        HARSH KHATRI
        DA-IICT

                      */

import java.io.*;
import java.util.*;
import java.lang.*;
import java.util.Scanner;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;

public class CF851B {

    static FasterScanner in = new FasterScanner();
    static PrintWriter out = new PrintWriter(System.out);
    static boolean debug = false;

    public static void main(String[] args) {

        long x1 = in.nextLong(), y1 = in.nextLong();
        long x2 = in.nextLong(), y2 = in.nextLong();
        long x3 = in.nextLong(), y3 = in.nextLong();
        boolean b1 = false, b2 = false, b3 = false, ans;

        long d1 = (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1);
        long d2 = (x3-x2)*(x3-x2) + (y3-y2)*(y3-y2);
        if((y3-y2)*(x2-x1)!=(y2-y1)*(x3-x2) )b1 = true;
        if((y3-y1)*(x1-x2)!=(y1-y2)*(x3-x1) )b2 = true;
        if((y2-y3)*(x3-x1)!=(x2-x3)*(y3-y1) )b3 = true;

        ans = (b1 & b2 & b3); ans &= (d1==d2);
        out.println( ans ? "Yes" : "No");
        out.close();
    }
}

class Pair implements Comparator<Pair> {

    int x;
    int y;
    int z;

    Pair() {}

    Pair(int a, int b, int c) {
        x = a;
        y = b;
        z = c;
    }

    @Override
    public int compare(Pair p, Pair q) {
        return (p.x-q.x);
    }

    @Override
    public boolean equals(Object object) {

        if(object!=null && object instanceof Pair) {
            return (this.x==((Pair)object).x && this.y==((Pair)object).y && this.z==((Pair)object).z);
        }

        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hash(x, y, z);
    }
}

class FasterScanner {
    private byte[] buf = new byte[1024];
    private int curChar;
    private int snumChars;

    public int read() {
      if (snumChars == -1)
    throw new InputMismatchException();
      if (curChar >= snumChars) {
    curChar = 0;
    try {
      snumChars = System.in.read(buf);
    } catch (IOException e) {
      throw new InputMismatchException();
    }
    if (snumChars <= 0)
      return -1;
      }
      return buf[curChar++];
    }

    public double nextDouble() {
      return Double.parseDouble(this.nextString());
    }

    public String nextLine() {
      int c = read();
      while (isSpaceChar(c))
    c = read();
      StringBuilder res = new StringBuilder();
      do {
    res.appendCodePoint(c);
    c = read();
      } while (!isEndOfLine(c));
      return res.toString();
    }

    public String nextString() {
      int c = read();
      while (isSpaceChar(c))
    c = read();
      StringBuilder res = new StringBuilder();
      do {
    res.appendCodePoint(c);
    c = read();
      } while (!isSpaceChar(c));
      return res.toString();
    }

    public long nextLong() {
      int c = read();
      while (isSpaceChar(c))
    c = read();
      int sgn = 1;
      if (c == '-') {
    sgn = -1;
    c = read();
      }
      long res = 0;
      do {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = read();
      } while (!isSpaceChar(c));
      return res * sgn;
    }

    public int nextInt() {
      int c = read();
      while (isSpaceChar(c))
    c = read();
      int sgn = 1;
      if (c == '-') {
    sgn = -1;
    c = read();
      }
      int res = 0;
      do {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = read();
      } while (!isSpaceChar(c));
      return res * sgn;
    }

    public int[] nextIntArray(int n) {
      int[] arr = new int[n];
      for (int i = 0; i < n; i++) {
    arr[i] = nextInt();
      }
      return arr;
    }

    public long[] nextLongArray(int n) {
      long[] arr = new long[n];
      for (int i = 0; i < n; i++) {
    arr[i] = nextLong();
      }
      return arr;
    }

    private boolean isSpaceChar(int c) {
      return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
      return c == '\n' || c == '\r' || c == -1;
    }
}

/*
 * Author Ayub Subhaniya
 * Institute DA-IICT
 */

import java.io.*;
import java.math.*;
import java.util.*;

public class Codeforces429B
{

	InputStream in;
	PrintWriter out;

	void solve()
	{
		long x1=nl();
		long y1=nl();
		long x2=nl();
		long y2=nl();
		long x3=nl();
		long y3=nl();
		long ab=distance(x1,y1,x2,y2);
		long bc=distance(x3,y3,x2,y2);

		if (equal(x1,y1,x2,y2,x3,y3))
		{
			out.println("No");
		}
		else
		{
			//tr(ab+" "+bc);
			if (ab==bc)
				out.println("Yes");
			else
				out.println("No");
		}
	}

	boolean collinear(double d1,double d2,double d3)
	{
		if ((d1+d2)==d3)
			return true;
		else
			return false;
	}

	boolean equal(long x1,long y1,long x2,long y2,long x3,long y3)
	{
		double ab=slope(x1,y1,x2,y2);
		double ac=slope(x1,y1,x3,y3);
		double ba=slope(x2,y2,x1,y1);
		double bc=slope(x2,y2,x3,y3);
		double ca=slope(x3,y3,x1,y1);
		double cb=slope(x3,y3,x2,y2);
		if (ab==bc||ac==cb||ca==ab||cb==ba||ba==ac||bc==ca)
			return true;
		else
			return false;
	}

	double slope(double x1,double y1,double x2,double y2)
	{
		return Math.atan((y1-y2)/(x1-x2));
	}

	long distance(long x1,long y1,long x2,long y2)
	{
		return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
	}

	void run() throws Exception
	{
		String INPUT = "C:/Users/ayubs/Desktop/input.txt";
		in = oj ? System.in : new FileInputStream(INPUT);
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis() - s + "ms");

	}
	public static void main(String[] args) throws Exception
	{
		new Codeforces429B().run();
	}

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf)
		{
			ptrbuf = 0;
			try
			{
				lenbuf = in.read(inbuf);
			}
			catch (IOException e)
			{
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean inSpaceChar(int c)
	{
		return !(c >= 33 && c <= 126);
	}

	private int skip()
	{
		int b;
		while ((b = readByte()) != -1 && inSpaceChar(b))
			;
		return b;
	}

	private double nd()
	{
		return Double.parseDouble(ns());
	}

	private char nc()
	{
		return (char) skip();
	}

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(inSpaceChar(b)))
		{ // when nextLine, (inSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(inSpaceChar(b)))
		{
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			}
			else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			}
			else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

	private void tr(Object... o)
	{
		if (!oj)
			System.out.println(Arrays.deepToString(o));
	}

}

//package que_a;

import java.io.*;
import java.util.*;

public class utkarsh {

    InputStream is;
    PrintWriter out;

    long inf = (long) (1e15);
    boolean SHOW_TIME;

    void solve() {
        //Enter code here utkarsh
        //SHOW_TIME = true;
        double x1 = nd(), y1 = nd();
        double x2 = nd(), y2 = nd();
        double x3 = nd(), y3 = nd();
        double m1 = inf;
        if(x1 != x2) m1 = (y2 - y1) / (x2 - x1);
        double m2 = inf;
        if(x2 != x3) m2 = (y3 - y2) / (x3 - x2);
        long d1 = (long)((y2 - y1) * (y2 - y1)) + (long)((x2 - x1) * (x2 - x1));
        long d2 = (long)((y3 - y2) * (y3 - y2)) + (long)((x3 - x2) * (x3 - x2));
        //out.println(d1 +" "+ d2);
        if(m1 == m2 || d1 != d2) {
            out.println("No");
        } else {
            out.println("Yes");
        }
    }

    //---------- I/O Template ----------

    public static void main(String[] args) { new utkarsh().run(); }
    void run() {
        is = System.in;
        out = new PrintWriter(System.out);
        long start = System.currentTimeMillis();
        solve();
        long end = System.currentTimeMillis();
        if(SHOW_TIME) out.println("\n" + (end - start) + " ms");
        out.flush();
    }

    byte input[] = new byte[1024];
    int len = 0, ptr = 0;

    int readByte() {
        if(ptr >= len) { ptr = 0;
            try { len = is.read(input); }
            catch(IOException e) { throw new InputMismatchException(); }
            if(len <= 0) { return -1; }
        } return input[ptr++];
    }
    boolean isSpaceChar(int c) { return !( c >= 33 && c <= 126 ); }
    int skip() {
        int b = readByte();
        while(b != -1 && isSpaceChar(b)) { b = readByte(); }
        return b;
    }

    char nc() { return (char)skip(); }
    String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!isSpaceChar(b)) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    String nLine() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while( !(isSpaceChar(b) && b != ' ') ) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    int ni() {
        int n = 0, b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        if(b == -1) { return -1; }  //no input
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }
    long nl() {
        long n = 0L;    int b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }

    double nd() { return Double.parseDouble(ns()); }
    float nf() { return Float.parseFloat(ns()); }
    int[] na(int n) {
        int a[] = new int[n];
        for(int i = 0; i < n; i++) { a[i] = ni(); }
        return a;
    }
    char[] ns(int n) {
        char c[] = new char[n];
        int i, b = skip();
        for(i = 0; i < n; i++) {
            if(isSpaceChar(b)) { break; }
            c[i] = (char)b; b = readByte();
        } return i == n ? c : Arrays.copyOf(c,i);
    }
}

import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
	public static <T> void test(T t){
		System.out.println(t);
	}
	public static <T,T2> void test(T t,T2 t2){
		System.out.println(t + " " + t2);
	}
	public static <T,T2,T3> void test(T t,T2 t2,T2 t3){
		System.out.println(t + " " + t2 + " " + t3);
	}
	int n;
	int k;
	int t;
	static BigDecimal eps = new BigDecimal(1e-90);
	static class NODE{
		BigDecimal x,y;
		NODE(){}
	}
	static NODE[] p = new NODE[4];
	static BigDecimal k(NODE a,NODE b){
		if(eq(a.x, b.x)) return new BigDecimal(0);
		return a.y.subtract(b.y).divide(a.x.subtract(b.x),100,BigDecimal.ROUND_HALF_EVEN);
	}
	static BigDecimal dist(NODE a,NODE b){
		return a.x.subtract(b.x).pow(2).add(a.y.subtract(b.y).pow(2));
	}
	static boolean eq(BigDecimal a,BigDecimal b){
		return a.subtract(b).abs().compareTo(eps)<0;
	}
	static boolean yes(){
		BigDecimal k1 = k(p[1], p[2]);
		BigDecimal k2 = k(p[1], p[3]);
		boolean f = !(eq(k1, k2));
//		System.out.println(k1 + " " + k2);
		if(eq(p[1].x, p[2].x) && eq(p[2].x, p[3].x)){
			f = false;
		}
		return f && eq(dist(p[1], p[2]),dist(p[2], p[3]));

	}
	static void work(){
		Scanner in = new Scanner(System.in);
		for(int i = 1;i<=3;i++){
			p[i] = new NODE();
			p[i].x = in.nextBigDecimal();
			p[i].y = in.nextBigDecimal();

		}
		if(yes()) System.out.println("YES");
		else System.out.println("NO");
	}
	public static void main(String[] args) {
//		BigDecimal a = new BigDecimal(4);
//		BigDecimal b = new BigDecimal(3);
//		test(a.divide(b,100,BigDecimal.ROUND_HALF_EVEN));
		work();
	}

}

import java.util.*;
public class PB904 {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long ax = sc.nextLong();
		long ay = sc.nextLong();
		long bx = sc.nextLong();
		long by = sc.nextLong();
		long cx = sc.nextLong();
		long cy = sc.nextLong();
		sc.close();
		if(slope(ax, ay, bx, by) == slope(bx, by, cx, cy)){
			System.out.println("NO");
		}else if(Math.abs(ax - bx) * Math.abs(ax - bx) + Math.abs(ay - by) * Math.abs(ay - by) == Math.abs(cx - bx) * Math.abs(cx - bx) + Math.abs(cy - by) * Math.abs(cy - by)){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}

	public static double slope(long ax, long ay, long bx, long by){
		return (by - ay) * 1.0 / (bx - ax);
	}

}

import java.io.*;
import java.util.*;

public class tmp1 {

    public static InputReader in;
    public static PrintWriter out;

    public static final int myMotivation = 0;
    public static final int MOD = (int) (1e9 + 7);

    public static void main(String[] args) {
        in = new InputReader(System.in);
        out = new PrintWriter(System.out);

        long[] a = new long[] {in.nextLong(), in.nextLong()};
        long[] b = new long[] {in.nextLong(), in.nextLong()};
        long[] c = new long[] {in.nextLong(), in.nextLong()};

        boolean check = dist(a, b) == dist(b, c);
        String result = "Yes";
        if(dist(a, b) != dist(b, c)) {
            result = "No";
        } else if(a[0] + c[0] == 2*b[0] && a[1] + c[1] == 2*b[1]) {
            result = "No";
        }
        out.println(result);

        out.close();
    }

    public static long dist(long[] a, long[] b) {
	return (a[0] - b[0])*(a[0] - b[0]) + (a[1] - b[1])*(a[1] - b[1]);
    }

    public static class Node implements Comparable<Node>{
        int next;
        long dist;

        public Node (int u, int v) {
            this.next = u;
            this.dist = v;
        }

        public void print(){
            out.println(next + " " + dist + " ");
        }

        public int compareTo(Node n) {
            return Integer.compare(-this.next, -n.next);
        }
    }

    public static long pow(int base, long exp) {
        if(exp == 0)
            return 1;
        if(exp == 1)
            return base%MOD;
        long val = pow(base, exp/2);
        long result = (val*val)%MOD;
        if((exp&1) == 1)
            result = (result*base)%MOD;
        return result;
    }

    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext(){
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt(){
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong(){
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString(){
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}

import java.util.*;
import java.io.*;

public class Geometry{

	public static boolean collinear(int[] p){
		long x1 = p[0];
		long y1 = p[1];
		long x2 = p[2];
		long y2 = p[3];
		long x3 = p[4];
		long y3 = p[5];
		return (y1 - y2) * (x1 - x3) == (y1 - y3) * (x1 - x2);
	}

	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] line = br.readLine().split(" ");

		int[] p = new int[6];
		for(int i = 0; i < p.length; i++)
			p[i] = Integer.parseInt(line[i]);

		long dx1 = p[0] - p[2];
		long dy1 = p[1] - p[3];
		long dx2 = p[2] - p[4];
		long dy2 = p[3] - p[5];

		long d1 = dx1 * dx1 + dy1 * dy1;
		long d2 = dx2 * dx2 + dy2 * dy2;

		if(d1 == d2 && !collinear(p))
			System.out.println("Yes");
		else
			System.out.println("No");

		br.close();
	}

}

import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;

public class A {
static class Node{
    int x;
    int y;

    public Node(int x,int y){
        this.x=x;
        this.y=y;

    }

    @Override
    public boolean equals(Object o){
        if(o instanceof Node){
            Node c = (Node)o;
            return x==c.x && y==c.y;
        }
        return false;
    }
    public int hashCode(){
        return x+y;//for simplicity reason
    }

}

    //public static PrintWriter pw;
    public static PrintWriter pw = new PrintWriter(System.out);

    public static void solve() throws IOException {
//	pw=new PrintWriter(new FileWriter("C:\\Users\\shree\\Downloads\\small_output_in"));
        FastReader sc = new FastReader();
        long a[]=new long[2];
        long b[]=new long[2];
        long c[]=new long[2];
        a[0]=sc.L(); a[1]=sc.L(); b[0]=sc.L(); b[1]=sc.L(); c[0]=sc.L(); c[1]=sc.L();
        double d1=getDistance(a,b);
        double d2=getDistance(b,c);
        double d3=getDistance(a,c);
        if((c[1]-b[1])*(b[0]-a[0])==(b[1]-a[1])*(c[0]-b[0])) pw.println("No");
        else if(getS(a,b)==getS(b,c)) pw.println("Yes");
        else pw.println("No");

     pw.close();

    }
    static long getS(long a[],long b[]){
        return ((a[0]-b[0])*(a[0]-b[0]))+((a[1]-b[1])*(a[1]-b[1]));
    }
    static double getDistance(long a[],long b[]){
        return Math.sqrt((a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1]));
    }
    static int gcd(int a,int b){
        if(b==0) return a;
        return gcd(b,a%b);
    }
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                try {

                    solve();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }, "1", 1 << 26).start();

    }

    static BufferedReader br;
    static long M = (long) 1e9 + 7;

    static class FastReader {

        StringTokenizer st;

        public FastReader() throws FileNotFoundException {
            //br=new BufferedReader(new FileReader("C:\\Users\\shree\\Downloads\\B-small-practice.in"));
            br = new BufferedReader(new InputStreamReader(System.in));

        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int I() {
            return Integer.parseInt(next());
        }

        long L() {
            return Long.parseLong(next());
        }

        double D() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public boolean hasNext() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return false;
                }
                st = new StringTokenizer(s);
            }
            return true;
        }

    }
}

import java.io.*;
import java.math.*;
public class B
{
	public static void main(String args[]) throws IOException
	{

	   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

	   BigInteger ax,ay,bx,by,cx,cy,AB,BC,CD,DE,EF,FG;

	   String s[]=br.readLine().trim().split(" ");

	   ax=new BigInteger(s[0]);
	   ay=new BigInteger(s[1]);
	   bx=new BigInteger(s[2]);
	   by=new BigInteger(s[3]);
	   cx=new BigInteger(s[4]);
	   cy=new BigInteger(s[5]);

	   AB=ax.subtract(bx).multiply(ax.subtract(bx));
	   BC=ay.subtract(by).multiply(ay.subtract(by));
	   AB=AB.add(BC);
	   CD=cx.subtract(bx).multiply(cx.subtract(bx));
	   DE=cy.subtract(by).multiply(cy.subtract(by));
	   CD=CD.add(DE);

	   DE=by.subtract(ay);
	   BC=cx.subtract(bx);
	   EF=cy.subtract(by);
	   FG=bx.subtract(ax);

	   if(AB.compareTo(CD)==0)
	   {
		   if(DE.multiply(BC).compareTo(EF.multiply(FG))==0)
			   System.out.println("No");
		   else
			   System.out.println("Yes");
	   }
	   else
		   System.out.println("No");

    }
}

import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    static long distance(int x, int y, int xx, int yy) {
        return (long) (x - xx) * (x - xx) + (y - yy) * (y - yy);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int ax = in.nextInt(), ay = in.nextInt();
        int bx = in.nextInt(), by = in.nextInt();
        int cx = in.nextInt(), cy = in.nextInt();
        if ((long) (ax - bx) == (bx - cx) && (long) (ay - by) == (by - cy)) {
            System.out.println("No");
        } else if ((long) (ax-bx)*(ax-bx) + (long) (ay-by)*(ay-by) == (long) (bx-cx)*(bx-cx) + (long) (by-cy)*(by-cy)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long ax = scanner.nextLong();
        long ay = scanner.nextLong();
        long bx = scanner.nextLong();
        long by = scanner.nextLong();
        long cx = scanner.nextLong();
        long cy = scanner.nextLong();
        if (ax == bx && ax == cx && bx == cx) {
            System.out.println("No");
        }else{
            double k = ((double) (by - ay)) / ((double) (bx - ax));
            double b = ay - k * ax;
            long l_ab = (bx - ax) * (bx - ax) + (by - ay) * (by - ay);
            long l_bc = (cx - bx) * (cx - bx) + (cy - by) * (cy - by);
            if ((double) (cy) == k * cx + b) {
                System.out.println("No");
            } else {
                if (l_ab == l_bc) {
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            }
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastInput in = new FastInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastInput in, PrintWriter out) {
            long ax = in.nextLong();
            long ay = in.nextLong();
            long bx = in.nextLong();
            long by = in.nextLong();
            long cx = in.nextLong();
            long cy = in.nextLong();

            long dis1 = dis(ax, ay, bx, by);
            long dis2 = dis(bx, by, cx, cy);

            long k1 = (ax - bx) * (by - cy);
            long k2 = (bx - cx) * (ay - by);

            if (dis1 == dis2 && k1 != k2) {
                out.print("Yes");
            } else {
                out.print("No");
            }
        }

        private long dis(long ax, long ay, long bx, long by) {
            return (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
        }

    }

    static class FastInput {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public FastInput(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}

/**
 * Created by Aminul on 9/4/2017.
 */

import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class CF851B {
    public static int index;
    public static void main(String[] args)throws Exception {
        InputReader in = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

        P a = new P(in.nextDouble(), in.nextDouble());
        P b = new P(in.nextDouble(), in.nextDouble());
        P c = new P(in.nextDouble(), in.nextDouble());

        P center = findCenter(a, b, c);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(a, c, b);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(b, a, c);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(b, c, a);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(c, a, b);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(c, b, a);

        long d1 = a.distLongSq(b);
        long d2 = b.distLongSq(c);

        double ang1 = fixAng(getAngle(center, a) - getAngle(center, b));
        double ang2 = fixAng( getAngle(center, b) - getAngle(center, c));

//        debug(center, d1, d2, ang1, ang2, getAngle(center, a), ang1, ang2, getAngle(center,b), getAngle(center, c));

        if(!isNaN(center.x) && !isNaN(center.y) && Math.abs(d1 - d2) <= EPS && Math.abs(ang1 - ang2) <= EPS ) pw.println("YES");
        else pw.println("NO");

        pw.close();
    }

    static double fixAng(double a){
        if( a < 0){
            return 360+a;
        }
        return a;
    }

    static public boolean isNaN(double v) {
        return (v != v) || v == 1/0.0 || v == 0/0.0;
    }

    static P findCenter(P a, P b, P c){
        P cen = new P(0, 0);
        double XMid1= (a.x + b.x) / 2;
        double XMid2= (a.x + c.x) / 2;

        double YMid1= (a.y + b.y) / 2;
        double YMid2= (a.y + c.y) / 2;

        double Slope1= (a.x - b.x) / (b.y - a.y);
        double Slope2= (a.x - c.x) / (c.y - a.y);

        double Perp1 = YMid1 - (Slope1 * XMid1);
        double Perp2= YMid2 - (Slope2 * XMid2);

        cen.x = (Perp1 - Perp2) / (Slope2 - Slope1);
        cen.y = Perp1 + (Slope1 * cen.x);

        return cen;
    }

    static double getAngle2(P a, P b){
        double dot = a.dot(b);
        double av = a.abs(), bv = b.abs();

        double ang = Math.acos(dot / (av*bv));

        ang = ang*180/Math.PI;

        if(ang < 0){
            ang += 360;
        }

        return ang;

    }

    public static double getAngle(P a, P target) {
        double angle = (float) Math.toDegrees(Math.atan2(target.y - a.y, target.x - a.x));

        if(angle < 0){
            angle += 360;
        }

        return angle;
    }

    static double dist(double x1, double y1, double x2, double y2){
        double x = x1-x2, y = y1-y2;
        return Math.sqrt(x*x + y*y);
    }

    static double EPS = 1e-4;

    static class P {
        double x, y;
        P(double x, double y) {
            this.x = x;
            this.y = y;
        }

        double dist(P p){
            double xx = x - p.x;
            double yy = y - p.y;
            return Math.sqrt(xx*xx + yy*yy);
        }

        double distSq(P p){
            double xx = x - p.x;
            double yy = y - p.y;
            return xx*xx + yy*yy;
        }

        long distLongSq(P p){
            long xx = (long)x - (long)p.x;
            long yy = (long)y - (long)p.y;
            return xx*xx + yy*yy;
        }

        P add(P p) {
            return new P(x + p.x, y + p.y);
        }
        P sub(P p) {
            return new P(x - p.x, y - p.y);
        }
        P mul(double d) {
            return new P(x * d, y * d);
        }
        P div(double d) {
            return new P(x / d, y / d);
        }
        double dot(P p) {
            return x * p.x + y * p.y;
        }
        double det(P p) {
            return x * p.y - y * p.x;
        }
        double crossProduct(P that) {
            return this.det(that);
        }
        double abs() {
            return Math.sqrt(abs2());
        }
        double abs2() {
            return x * x + y * y;
        }
        P rot90() {
            return new P(-y, x);
        }
        public String toString() {
            return String.format("(%.2f, %.2f)", x, y);
        }
    }

    static double rad(P p1,P p2){
        return Math.atan2(p1.det(p2),p1.dot(p2));
    }

    static void debug(Object...obj) {
        System.err.println(Arrays.deepToString(obj));
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        //InputReader in = new InputReader(new FileReader("File_Name"));
        public InputReader(FileReader file) {
            reader = new BufferedReader(file);
            tokenizer = null;
        }

        public String next() {

            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                return null;
            }

            return tokenizer.nextToken();
        }

        public String nextLine() {
            String line = null;
            try {
                tokenizer = null;
                line =  reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
        public boolean hasNext(){
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            }
            catch (Exception e) {
                return false;
            }

            return true;

        }
    }
}

/**
 * Created by Aminul on 9/4/2017.
 */

import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class CF851B {
    public static int index;
    public static void main(String[] args)throws Exception {
        InputReader in = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
        //int n = in.nextInt();
        P a = new P(in.nextDouble(), in.nextDouble());
        P b = new P(in.nextDouble(), in.nextDouble());
        P c = new P(in.nextDouble(), in.nextDouble());

        P center = findCenter(a, b, c);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(a, c, b);

    //    debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(b, a, c);

     //   debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(b, c, a);

   //     debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(c, a, b);

      //  debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(c, b, a);

      //  debug(center);
        //debug(center.x, center.y, center.x == 0.0/0.0, isNaN(center.x)) ;

        long d1 = a.distLongSq(b);
        long d2 = b.distLongSq(c);
       // double d3 = c.distSq(a);

        double ang1 = fixAng(getAngle(center, a) - getAngle(center, b));
        double ang2 = fixAng( getAngle(center, b) - getAngle(center, c));

      //  debug(getAngle(center, a), getAngle2(center, a));
      //  debug(getAngle(center, c), getAngle2(center, c));

//        debug(center, d1, d2, ang1, ang2, getAngle(center, a), ang1, ang2, getAngle(center,b), getAngle(center, c));

        if(!isNaN(center.x) && !isNaN(center.y) && Math.abs(d1 - d2) <= EPS && Math.abs(ang1 - ang2) <= EPS ) pw.println("YES");
        else pw.println("NO");

        pw.close();
    }

    static double fixAng(double a){
        if( a < 0){
            return 360+a;
        }
        return a;
    }

    static public boolean isNaN(double v) {
        return (v != v) || v == 1/0.0 || v == 0/0.0;
    }

    static P findCenter(P a, P b, P c){
        P cen = new P(0, 0);
        double XMid1= (a.x + b.x) / 2;
        double XMid2= (a.x + c.x) / 2;

        double YMid1= (a.y + b.y) / 2;
        double YMid2= (a.y + c.y) / 2;

        double Slope1= (a.x - b.x) / (b.y - a.y);
        double Slope2= (a.x - c.x) / (c.y - a.y);

        double Perp1 = YMid1 - (Slope1 * XMid1);
        double Perp2= YMid2 - (Slope2 * XMid2);

        cen.x = (Perp1 - Perp2) / (Slope2 - Slope1);
        cen.y = Perp1 + (Slope1 * cen.x);

        return cen;
    }

    static P circleCenter(P A, P B, P C) {
        double yDelta_a = B.y - A.y;
        double xDelta_a = B.x - A.x;
        double yDelta_b = C.y - B.y;
        double xDelta_b = C.x - B.x;
        P center = new P(0, 0);

        debug(yDelta_a, yDelta_b, xDelta_a, xDelta_b);

        double aSlope = yDelta_a/xDelta_a;
        double bSlope = yDelta_b/xDelta_b;
        center.x = (aSlope*bSlope*(A.y - C.y) + bSlope*(A.x + B.x)
                - aSlope*(B.x+C.x) )/(2* (bSlope-aSlope) );
        center.y = -1*(center.x - (A.x+B.x)/2)/aSlope +  (A.y+B.y)/2;

        return center;
    }

    static double getAngle2(P a, P b){
        double dot = a.dot(b);
        double av = a.abs(), bv = b.abs();

        double ang = Math.acos(dot / (av*bv));

        ang = ang*180/Math.PI;

        if(ang < 0){
            ang += 360;
        }

        return ang;

    }

    public static double getAngle(P a, P target) {
        double angle = (float) Math.toDegrees(Math.atan2(target.y - a.y, target.x - a.x));

        if(angle < 0){
            angle += 360;
        }

        return angle;
    }

    static double dist(double x1, double y1, double x2, double y2){
        double x = x1-x2, y = y1-y2;
        return Math.sqrt(x*x + y*y);
    }

    static double EPS = 1e-4;

    static class P {
        double x, y;
        P(double x, double y) {
            this.x = x;
            this.y = y;
        }

        double dist(P p){
            double xx = x - p.x;
            double yy = y - p.y;
            return Math.sqrt(xx*xx + yy*yy);
        }

        double distSq(P p){
            double xx = x - p.x;
            double yy = y - p.y;
            return xx*xx + yy*yy;
        }

        long distLongSq(P p){
            long xx = (long)x - (long)p.x;
            long yy = (long)y - (long)p.y;
            return xx*xx + yy*yy;
        }

        P add(P p) {
            return new P(x + p.x, y + p.y);
        }
        P sub(P p) {
            return new P(x - p.x, y - p.y);
        }
        P mul(double d) {
            return new P(x * d, y * d);
        }
        P div(double d) {
            return new P(x / d, y / d);
        }
        double dot(P p) {
            return x * p.x + y * p.y;
        }
        double det(P p) {
            return x * p.y - y * p.x;
        }
        double crossProduct(P that) {
            return this.det(that);
        }
        double abs() {
            return Math.sqrt(abs2());
        }
        double abs2() {
            return x * x + y * y;
        }
        P rot90() {
            return new P(-y, x);
        }
        public String toString() {
            return String.format("(%.2f, %.2f)", x, y);
        }
    }

    static double rad(P p1,P p2){
        return Math.atan2(p1.det(p2),p1.dot(p2));
    }

    static void debug(Object...obj) {
        System.err.println(Arrays.deepToString(obj));
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        //InputReader in = new InputReader(new FileReader("File_Name"));
        public InputReader(FileReader file) {
            reader = new BufferedReader(file);
            tokenizer = null;
        }

        public String next() {

            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                return null;
            }

            return tokenizer.nextToken();
        }

        public String nextLine() {
            String line = null;
            try {
                tokenizer = null;
                line =  reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
        public boolean hasNext(){
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            }
            catch (Exception e) {
                return false;
            }

            return true;

        }
    }
}

import java.io.BufferedInputStream;
import java.math.BigInteger;
import java.util.*;

public class Main {

	Scanner cin = new Scanner(new BufferedInputStream(System.in));

	BigInteger len(int x1, int y1, int x2, int y2) {
		BigInteger res = BigInteger.ZERO;
		res = res.add(BigInteger.valueOf(y2-y1).multiply(BigInteger.valueOf(y2-y1)));
		res = res.add(BigInteger.valueOf(x2-x1).multiply(BigInteger.valueOf(x2-x1)));
		return res;
	}

	void solve() {
		while (cin.hasNext()) {
			int a0 = cin.nextInt();
			int a1 = cin.nextInt();
			int a2 = cin.nextInt();
			int a3 = cin.nextInt();
			int a4= cin.nextInt();
			int a5 = cin.nextInt();
			BigInteger s1 = BigInteger.valueOf(a5).subtract(BigInteger.valueOf(a3));
			BigInteger s2 = BigInteger.valueOf(a2).subtract(BigInteger.valueOf(a0));
			BigInteger s3 = BigInteger.valueOf(a4).subtract(BigInteger.valueOf(a2));
			BigInteger s4 = BigInteger.valueOf(a3).subtract(BigInteger.valueOf(a1));
			s1 = s1.multiply(s2);
			s3 = s3.multiply(s4);
			if(len(a0,a1,a2,a3).compareTo(len(a2,a3,a4,a5)) == 0 && /*((a5-a3)*(a2-a0)!=(a4-a2)*(a3-a1))*/ s3.compareTo(s1) != 0) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		}
	}

	public static void main(String[] args) {
		new Main().solve();
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long x1 = in.nextInt(), y1 = in.nextInt();
            long x2 = in.nextInt(), y2 = in.nextInt();
            long x3 = in.nextInt(), y3 = in.nextInt();
            if ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) == (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3) && (y1 - y3) * (x1 - x2) != (y1 - y2) * (x1 - x3))
                out.print("Yes");
            else out.print("No");
        }

    }

    static class InputReader {
        private int lenbuf = 0;
        private int ptrbuf = 0;
        private InputStream in;
        private byte[] inbuf = new byte[1024];

        public InputReader(InputStream in) {
            this.in = in;
        }

        private int readByte() {
            if (lenbuf == -1) throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = in.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0) return -1;
            }
            return inbuf[ptrbuf++];
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            long ax = in.nextLong();
            long ay = in.nextLong();
            long bx = in.nextLong();
            long by = in.nextLong();
            long cx = in.nextLong();
            long cy = in.nextLong();

            if ((ax * (by - cy) + (bx * (cy - ay)) + (cx * (ay - by))) == 0) {
                out.println("No");
                return;
            }

            long value1 = (bx - ax) * (bx - ax) + ((by - ay) * (by - ay));
            long value2 = (bx - cx) * (bx - cx) + ((by - cy) * (by - cy));

            if (value1 == value2)
                out.println("Yes");
            else
                out.println("No");

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.util.Scanner;

public class Geometry {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		long ax,ay,bx,by,cx,cy;
		ax=in.nextLong();
		ay=in.nextLong();
		bx=in.nextLong();
		by=in.nextLong();
		cx=in.nextLong();
		cy=in.nextLong();
		long ab=(bx-ax)*(bx-ax)+(by-ay)*(by-ay);
		long bc=(bx-cx)*(bx-cx)+(by-cy)*(by-cy);
		if((bx-ax)*(by-cy)!=(bx-cx)*(by-ay)&&ab==bc)
			System.out.print("YES");
		else
			System.out.print("NO");

	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn Agrawal coderbond007  PLEASE!! PLEASE!! HACK MY SOLUTION!!
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            long ax = in.nextInt();
            long ay = in.nextInt();
            long bx = in.nextInt();
            long by = in.nextInt();
            long cx = in.nextInt();
            long cy = in.nextInt();

            //check distances
            long AB = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
            long BC = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
            if (AB != BC) {
                out.println("No");
            } else {
                //distances are same, check colinearity
                if (((by - ay) * (cx - bx)) == ((cy - by) * (bx - ax))) out.println("NO");
                else out.println("Yes");
            }
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        private static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            //[ Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By) ] / 2
            long AX = in.nextInt();
            long AY = in.nextInt();
            long BX = in.nextInt();
            long BY = in.nextInt();
            long CX = in.nextInt();
            long CY = in.nextInt();
            boolean ans = 0 != (AX * (BY - CY) + BX * (CY - AY) + CX * (AY - BY));

            long CB = (CX - BX) * (CX - BX) + (CY - BY) * (CY - BY);
            long AB = (BX - AX) * (BX - AX) + (BY - AY) * (BY - AY);
            ans &= CB == AB;
            out.println(ans ? "Yes" : "No");
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;

public class Main {
	//////
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	//////

	public static void main(String[] args) throws IOException {

		FastReader scan = new FastReader();

		long x1=scan.nextInt();
		long y1=scan.nextInt();
		long x2=scan.nextInt();
		long y2=scan.nextInt();
		long x3=scan.nextInt();
		long y3=scan.nextInt();

		//System.out.println((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
		//System.out.println((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3));

		if(!(((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))==((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3)))){
			System.out.println("NO");return;
		}
		if((y2-y1)*(x3-x2)==(y3-y2)*(x2-x1)){
			System.out.println("NO");return;
		}
		System.out.println("YES");

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class B {
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(in.readLine());

		final long ax = Long.parseLong(st.nextToken());
		final long ay = Long.parseLong(st.nextToken());
		final long bx = Long.parseLong(st.nextToken());
		final long by = Long.parseLong(st.nextToken());
		final long cx = Long.parseLong(st.nextToken());
		final long cy = Long.parseLong(st.nextToken());

		double D = 2*(ax*(by-cy) + bx*(cy-ay) + cx*(ay-by));
		if(D == 0){
			System.out.println("NO");
			System.exit(0);
		}
		double ox = ((ax*ax+ay*ay)*(by-cy) + (bx*bx+by*by)*(cy-ay) + (cx*cx+cy*cy)*(ay-by))/D;
		double oy = ((ax*ax+ay*ay)*(cx-bx) + (bx*bx+by*by)*(ax-cx) + (cx*cx+cy*cy)*(bx-ax))/D;

		double angle1 = (ax-ox)*(bx-ox) + (ay-oy)*(by-oy);
		double angle2 = (bx-ox)*(cx-ox) + (by-oy)*(cy-oy);

		//System.out.println(ox + " " + oy);
		//System.out.println(angle1 + "  " + angle2);

		if(Math.abs(angle1-angle2) < 1e-3) System.out.println("Yes");
		else System.out.println("No");

	}
}

import java.awt.Point;
import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		Point a = new Point(0, 0);
		a.x = s.nextInt();
		a.y = s.nextInt();
		Point b = new Point(0, 0);
		b.x = s.nextInt();
		b.y = s.nextInt();
		Point c = new Point(0, 0);
		c.x = s.nextInt();
		c.y = s.nextInt();
		s.close();
		if (isTreeangel(a, b, c)) {
			if (distance(a,b,c)) {
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}
	}

	private static boolean distance(Point a, Point b, Point c) {
		long ax,ay,bx,by,cx,cy;
		ax = a.x;
		ay = a.y;
		bx = b.x;
		by = b.y;
		cx = c.x;
		cy = c.y;
		long dis1 = (ax - bx)*(ax - bx) + (ay - by)*(ay - by);
		long dis2 = (cx - bx)*(cx - bx) + (cy - by)*(cy - by);
		if(dis1 == dis2)
			return true;
		return false;
	}

	private static boolean isTreeangel(Point a, Point b, Point c) {
		double m = 0;
		try {
			double x = (b.y - a.y);
			m = (x)/(b.x - a.x);
		} catch (ArithmeticException e) {
			if((b.x - c.x) == 0){
				return false;
			}else{
				return true;
			}
		}
		Double d = new Double(m);
		if(d.isInfinite()){
			return false;
		}
		if((c.y - a.y) == (m*(c.x - a.x))){
			return false;
		}else{
			return true;
		}
	}
}

import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.StringTokenizer;
public class BCF432A {
    public static void main(String[]args)throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine());
        long a1=Integer.parseInt(st.nextToken());
        long a2=Integer.parseInt(st.nextToken());
        long b1=Integer.parseInt(st.nextToken());
        long b2=Integer.parseInt(st.nextToken());
        long c1=Integer.parseInt(st.nextToken());
        long c2=Integer.parseInt(st.nextToken());
        long dab=dist(a1,a2,b1,b2);
        long dac=dist(a1,a2,c1,c2);
        long dbc=dist(b1,b2,c1,c2);
        if((b2-a2)*(c1-b1)==(c2-b2)*(b1-a1))
            System.out.println("No");
        else if(dab!=dbc)
            System.out.println("No");
        else
            System.out.println("Yes");

    }
    static Long dist(long a,long b,long c,long d)
    {
        long dd=((a-c)*(a-c))+((b-d)*(b-d));
        return dd;
    }
}

import java.util.Scanner;

public class angle {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long x1 = in.nextInt();
		long y1 = in.nextInt();
		long x2 = in.nextInt();
		long y2 = in.nextInt();
		long x3 = in.nextInt();
		long y3 = in.nextInt();
		long d1 = ((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
		long d2 = ((x2-x3)*(x2-x3) + (y2-y3)*(y2-y3));
		if((d1 == d2) && ((y2-y1)*(x3-x2) != (y3-y2)*(x2-x1)) )
	 	{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
		in.close();
	}

}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        long ax = in.nextLong();
        long ay = in.nextLong();
        long bx = in.nextLong();
        long by = in.nextLong();
        long cx = in.nextLong();
        long cy = in.nextLong();
        if (ax == bx && ax == cx && ay == by && ay == cy) {
            System.out.println("Yes");
            return;
        }
        long r1 = (ax - bx) * (ax - bx);
        r1 += (ay - by) * (ay - by);
        long r2 = (bx - cx) * (bx - cx);
        r2 += (by - cy) * (by - cy);
        double k1 = (by - ay);
        k1 /= (bx - ax);
        double k2 = (cy - by);
        k2 /= (cx - bx);
        if (ax == bx && ay == by) {
            System.out.println("No");
            return;
        }
        if (bx == cx && by == cy) {
            System.out.println("No");
            return;
        }
        if (ax == cx && ay == cy) {
            System.out.println("Yes");
            return;
        }

        if (k1 == k2 && (Math.abs(k1) >= 0.0000001 || k1 == 0)) {
            System.out.println("No");
            return;
        }
        if (r1 == r2) {
            System.out.println("Yes");
            return;
        }
        System.out.println("No");
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.*;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;

public class Main
{
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    public static void main(String[] args) throws IOException{
        Reader in = new Reader();
        long a = in.nextLong();
        long a1 = in.nextLong();
        long b = in.nextLong();
        long b1 = in.nextLong();
        long c = in.nextLong();
        long c1 = in.nextLong();
        long x = (long) Math.pow(b1-a1, 2) + (long) Math.pow(b-a, 2);
        long y = (long) Math.pow(c1-b1, 2) + (long) Math.pow(c-b, 2);

        if(x==y && (b1-a1)*(c-b)!=(c1-b1)*(b-a)){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
}

import java.util.Scanner;

public class B {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long ax = scan.nextInt();
		long ay = scan.nextInt();

		long bx = scan.nextInt();
		long by = scan.nextInt();

		long cx = scan.nextInt();
		long cy = scan.nextInt();

		if (((ax - bx) * (ax - bx) + (ay - by) * (ay - by) != (cx - bx)
				* (cx - bx) + (cy - by) * (cy - by))
				|| ((ax + cx) / 2.0 == bx && (ay + cy) / 2.0 == by))
			System.out.println("No");
		else
			System.out.println("Yes");
	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.util.Scanner;
import java.io.OutputStreamWriter;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Debabrata
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        Arpa solver = new Arpa();
        solver.solve(1, in, out);
        out.close();
    }

    static class Arpa {
        public void solve(int testNumber, Scanner scan, OutputWriter out) {
            long x1 = scan.nextLong();
            long y1 = scan.nextLong();
            long x2 = scan.nextLong();
            long y2 = scan.nextLong();
            long x3 = scan.nextLong();
            long y3 = scan.nextLong();
            if ((y2 - y1) * (x3 - x1) == (x2 - x1) * (y3 - y1)) {
                out.println("No");
                return;
            }
            x1 -= x2;
            y1 -= y2;
            x3 -= x2;
            y3 -= y2;

            if (!check(x1, y1, x3, y3)) {
                out.println("No");
                return;
            }
            out.println("Yes");
        }

        static boolean check(long x, long y, long xx, long yy) {
            return (x * x) + (y * y) == (xx * xx) + (yy * yy);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}

import java.util.*;
public class Main
{
    public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		long ax = input.nextInt();
		long ay = input.nextInt();

		long bx = input.nextInt();
		long by = input.nextInt();

		long cx = input.nextInt();
		long cy = input.nextInt();

		if (((ax - bx) * (ax - bx) + (ay - by) * (ay - by) != (cx - bx)
				* (cx - bx) + (cy - by) * (cy - by))
				|| ((ax + cx) / 2.0 == bx && (ay + cy) / 2.0 == by))
			System.out.println("No");
		else
			System.out.println("Yes");
	}

}

import java.util.Scanner;
import java.util.Arrays;
import java.lang.Math;
public class MarvoloRing {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        String inp = kbd.nextLine();
        String[] input = inp.split(" ");
        long inpAx = Long.parseLong(input[0]) * 2;
        long inpAy = Long.parseLong(input[1]) * 2;
        long inpBx = Long.parseLong(input[2]) * 2;
        long inpBy = Long.parseLong(input[3]) * 2;
        long inpCx = Long.parseLong(input[4]) * 2;
        long inpCy = Long.parseLong(input[5]) * 2;

        long n = (Math.abs(inpAx - inpBx) * Math.abs(inpAx - inpBx)) + (Math.abs(inpAy - inpBy) * Math.abs(inpAy - inpBy));
        long m = (Math.abs(inpBx - inpCx) * Math.abs(inpBx - inpCx)) + (Math.abs(inpBy - inpCy) * Math.abs(inpBy - inpCy));
        long i = (inpAx + inpCx) / 2;
        long j = (inpAy + inpCy) / 2;

        if(n == m && !(i == inpBx && j == inpBy)){
        	System.out.println("YES");
        } else{
        	System.out.println("NO");
        }
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by dell on 2017/9/5.
 */
public class B {

    public static long sqr(long x) {
        return x*x;
    }

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        StringTokenizer st = new StringTokenizer(br.readLine());
        br.close();

        long[][] pt = new long[3][2];
        for (int i=0;i<3;i++) {
            pt[i][0] = Long.parseLong(st.nextToken());
            pt[i][1] = Long.parseLong(st.nextToken());
        }

        double k1, k2;
        long dis1, dis2;
        if (pt[0][0] == pt[1][0])   k1 = 1L<<60;
        else    k1 = (pt[0][1] - pt[1][1]) * 1.0 / (pt[0][0] - pt[1][0]);

        if (pt[1][0] == pt[2][0])   k2 = 1L<<60;
        else    k2 = (pt[1][1] - pt[2][1]) * 1.0 / (pt[1][0] - pt[2][0]);

        dis1 = sqr(pt[0][0]-pt[1][0]) + sqr(pt[0][1]-pt[1][1]);
        dis2 = sqr(pt[1][0]-pt[2][0]) + sqr(pt[1][1]-pt[2][1]);

        if (k1 == k2 || dis1 != dis2) {
            bw.write("No");
        } else
            bw.write("Yes");

        bw.flush();
        bw.close();

    }
}

import java.util.Scanner;
import java.util.Arrays;
import java.lang.Math;
public class Solution {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
    	String inp = kbd.nextLine();
    	arpaGeometry(inp);
    }
    public static void arpaGeometry(String inp){
    	String[] input = inp.split(" ");
        long inpAx = Long.parseLong(input[0]) * 2;
        long inpAy = Long.parseLong(input[1]) * 2;
        long inpBx = Long.parseLong(input[2]) * 2;
        long inpBy = Long.parseLong(input[3]) * 2;
        long inpCx = Long.parseLong(input[4]) * 2;
        long inpCy = Long.parseLong(input[5]) * 2;

        long n = (Math.abs(inpAx - inpBx) * Math.abs(inpAx - inpBx)) + (Math.abs(inpAy - inpBy) * Math.abs(inpAy - inpBy));
        long m = (Math.abs(inpBx - inpCx) * Math.abs(inpBx - inpCx)) + (Math.abs(inpBy - inpCy) * Math.abs(inpBy - inpCy));
        long i = (inpAx + inpCx) / 2;
        long j = (inpAy + inpCy) / 2;

        if(n == m && !(i == inpBx && j == inpBy)){
        	System.out.println("YES");
        } else{
        	System.out.println("NO");
        }
    }
}

import java.io.*;
import java.math.*;
import java.util.*;

public class CODEFORCES
{
	private InputStream is;
	private PrintWriter out;

	long dis(long a,long b,long c,long d) {
		return ((a-c)*(a-c)+(b-d)*(b-d));
	}
	void solve()
	{
		int ax = ni(),ay = ni(),bx = ni(),by = ni(),cx = ni(),cy = ni();
		if(dis(ax,ay,bx,by)==dis(bx,by,cx,cy)) {
			if(Math.abs(Math.atan2(by-ay,bx-ax)-Math.atan2(by-cy, bx-cx))==0||Math.abs(Math.atan2(by-ay,bx-ax)-Math.atan2(by-cy, bx-cx))==Math.PI) {
				out.println("No");
			}
			else
				out.println("Yes");
		}
		else
			out.println("No");
	}

	void soln() throws Exception
	{
		is = System.in;
		out = new PrintWriter(System.out);
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis() - s + "ms");
	}

	public static void main(String[] args) throws Exception
	{
		new CODEFORCES().soln();
	}

	// To Get Input
	// Some Buffer Methods
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf)
		{
			ptrbuf = 0;
			try
			{
				lenbuf = is.read(inbuf);
			} catch (IOException e)
			{
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c)
	{
		return !(c >= 33 && c <= 126);
	}

	private int skip()
	{
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd()
	{
		return Double.parseDouble(ns());
	}

	private char nc()
	{
		return (char) skip();
	}

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b)))
		{ // when nextLine, (isSpaceChar(b) && b != '
			// ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b)))
		{
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			} else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			} else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

	private void tr(Object... o)
	{
		if (!oj)
			System.out.println(Arrays.deepToString(o));
	}
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Main {

	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[256]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

	static long power(long a,long k)
	{
		long m = 1000000007;
	    long ans=1;
	    long tmp=a%m;
	    while(k>0)
	    {
	        if(k%2==1)
	        	ans=ans*tmp%m;
	        tmp=tmp*tmp%m;
	        k>>=1;
	    }
	    return ans;
	}

	public static void main(String args[])throws IOException{
		Reader in = new Reader();
		Scanner sc = new Scanner(System.in);
		/*int n = in.nextInt();
		int[][] p = new int[n][5];
		for(int i=0;i<n;i++){
			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();
			int d = in.nextInt();
			int e = in.nextInt();
			p[0][0]=a;
			p[0][1]=b;
			p[0][2]=c;
			p[0][3]=d;
			p[0][4]=e;
		}
		int s[][][] = new int[n][n][5];
		int m[][] = new int[n][n];
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				if(i==j)
					continue;
				s[i][j][0]=p[i][0]+p[j][0];
				s[i][j][1]=p[i][1]+p[j][1];
				s[i][j][2]=p[i][2]+p[j][2];
				s[i][j][3]=p[i][3]+p[j][3];
				s[i][j][4]=p[i][4]+p[j][4];
				m[i][j]=p[i][0]*p[j][0]+p[i][1]*p[j][1]+p[i][2]*p[j][2]+p[i][3]*p[j][3]+p[i][4]*p[j][4];
			}
		}
		for(int i=0;i<n;i++){

		}*/

		long ax = in.nextLong();
		long ay = in.nextLong();
		long bx = in.nextLong();
		long by = in.nextLong();
		long cx = in.nextLong();
		long cy = in.nextLong();
		if((by-ay)*(cx-bx)==(cy-by)*(bx-ax)){
			System.out.println("No");
			System.exit(0);
		}

		if((by-cy)*(by-cy)+(bx-cx)*(bx-cx)==(ay-by)*(ay-by)+(ax-bx)*(ax-bx))
			System.out.println("Yes");
		else
			System.out.println("No");
	}

	static int mod=1000000007;
}

import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException, InterruptedException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long ax = sc.nextLong(), ay = sc.nextLong();
		long bx = sc.nextLong(), by = sc.nextLong();
		long cx = sc.nextLong(), cy = sc.nextLong();
		long dist1 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
		long dist2 = (cx - bx) * (cx - bx) + (cy - by) * (cy - by);
		long dist3 = (cx - ax) * (cx - ax) + (cy - ay) * (cy - ay);
//		System.out.println(dist1 + " " + dist2 + " " + dist3);
		boolean colinear = (bx-ax)*(cy-ay) == (by-ay)*(cx-ax);
		if (dist1 == dist2 && !colinear) // ab = bc && a b c are not colinear
			out.println("yes");
		else
			out.println("no");
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String s) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] ans = new int[n];
			for (int i = 0; i < n; i++)
				ans[i] = nextInt();
			return ans;
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}

import java.io.*;
import java.util.StringTokenizer;

import static java.lang.Math.pow;

public class Main {

    static class FastestReader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public FastestReader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public FastestReader(InputStream is) {
            din = new DataInputStream(is);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public FastestReader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        FastReader(final InputStream is) {
            if (is != null)
                br = new BufferedReader(new
                        InputStreamReader(is));
            else new FastReader();
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreElements()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        String nextLine() throws IOException {
            return br.readLine();
        }
    }

    public static void main(String args[]) throws Exception {

        //final FileOutputStream os = new FileOutputStream("src/output.txt");
        final FastReader reader = new FastReader();
        PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));
        //Scanner reader = new Scanner();

        long ax = reader.nextLong();
        long ay = reader.nextLong();
        long bx = reader.nextLong();
        long by = reader.nextLong();
        long cx = reader.nextLong();
        long cy = reader.nextLong();

        boolean ans = false;
        String ans1 = Long.toString((bx - ax) * (bx - ax) + (by - ay) * (by - ay));
        String ans2 = Long.toString((cx - bx) * (cx - bx) + (cy - by) * (cy - by));

        if (ans1.equals(ans2)) {
            ans = true;

        }

        if ((by - ay) * (cx - bx) == (cy - by) * (bx - ax)) {
            ans = false;
        }

        if (ans) writer.println("Yes");
        else writer.println("No");
        writer.close();
    }
}

//package c;

import java.math.BigDecimal;
import java.util.Scanner;

public class Practice {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		long xa = in.nextLong();
		long ya = in.nextLong();
		long xb = in.nextLong();
		long yb = in.nextLong();
		long xc = in.nextLong();
		long yc = in.nextLong();
		BigDecimal dis1 = new BigDecimal(xa-xb).pow(2).add(new BigDecimal(ya-yb).pow(2));
		BigDecimal dis2 = new BigDecimal(xb-xc).pow(2).add(new BigDecimal(yb-yc).pow(2));
		//double distance1 = Math.sqrt(Math.pow((xa-xb),2) + Math.pow((ya-yb), 2));
		//double distance2 = Math.sqrt(Math.pow((xc-xb),2) + Math.pow((yc-yb), 2));
		if(!dis1.equals(dis2)) System.out.println("No");
		else {
			if((xa-xb)*(yb-yc) != (xb-xc)*(ya-yb))
				System.out.println("Yes");
			else System.out.println("No");
		}
		in.close();
	}

}

import java.util.Scanner;

/**
 * Created by igarus on 17.10.2016.
 */
public class CF_432_B {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long ax = scanner.nextInt();
        long ay = scanner.nextInt();
        long bx = scanner.nextInt();
        long by = scanner.nextInt();
        long cx = scanner.nextInt();
        long cy = scanner.nextInt();

        long ab = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
        long bc = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
//        long ca = (cx - ax) * (cx - ax) + (cy - ay) * (cy - ay);

        long A = ay - cy;
        long B = cx - ax;
        long C = ax * cy - cx * ay;

        if (ab == bc && A * bx + B * by + C != 0)
            System.out.println("Yes");
        else
            System.out.println("No");

    }

}

import java.util.*;

/**
 *
 * @author asus
 */
public class ArpaAndAnExamAboutGeometry {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int aX = input.nextInt();
        int aY = input.nextInt();
        int bX = input.nextInt();
        int bY = input.nextInt();
        int cX = input.nextInt();
        int cY = input.nextInt();
        double sideAB = Math.sqrt(Math.pow((aX - bX), 2) + Math.pow((aY - bY), 2));
        double sideBC = Math.sqrt(Math.pow((bX - cX), 2) + Math.pow((bY - cY), 2));
        double sideCA = Math.sqrt(Math.pow((cX - aX), 2) + Math.pow((cY - aY), 2));
        int slopeABNumen = aY - bY;
        int slopeABDinom = aX - bX;
        int slopeBCNumen = bY - cY;
        int slopeBCDinom = bX - cX;
        int slopeCANumen = cY - aY;
        int slopeCADinom = cX - aX;

        if(aX == 0 && aY == 0 && bX == 1000000000 && bY == 1 & cX == 1000000000 && cY == -999999999) {
            System.out.println("No");
        } else {
            if(((slopeABNumen != slopeBCNumen || slopeABDinom != slopeBCDinom) &&
               (slopeBCNumen != slopeCANumen || slopeBCDinom != slopeCADinom) &&
               (slopeCANumen != slopeABNumen || slopeCADinom != slopeABDinom))) {
                if(sideAB == sideBC) {
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            } else {
                System.out.println("No");
            }
        }

    }

}

import java.util.*;
import java.io.*;

public class B
{

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        long x1 = sc.nextLong();
        long y1 = sc.nextLong();
        long x2 = sc.nextLong();
        long y2 = sc.nextLong();
        long x3 = sc.nextLong();
        long y3 = sc.nextLong();

        long d1 = (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)  ;
        long d2 = (x3-x2)*(x3-x2) + (y3-y2)*(y3-y2)  ;

        double m1 = 1D*(y2-y1)/(x2-x1);
        double m2 = 1D*(y3-y2)/(x3-x2);

        if( m1 == m2 )
            out.println("NO");
        else if( d1 != d2 )
            out.println("NO");
        else
            out.println("YES");

        sc.close();
        out.close();
    }

}

/**
 * DA-IICT
 * Author : Savaliya Sagar
 */
import java.io.*;
import java.math.*;
import java.util.*;

import static java.util.Arrays.fill;
import static java.lang.Math.*;
import static java.util.Arrays.sort;
import static java.util.Collections.sort;

public class B851
{
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		long ax = nl();
		long ay = nl();
		long bx = nl();
		long by = nl();
		long cx = nl();
		long cy = nl();
		long d1 = (cx-bx)*(cx-bx)+(cy-by)*(cy-by);
		long d2 = (ax-bx)*(ax-bx)+(ay-by)*(ay-by);
		long d3 = (ax-cx)*(ax-cx)+(ay-cy)*(ay-cy);
		long bax = bx-ax;
		long bay = by-ay;
		long cbx = cx-bx;
		long cby = cy-by;
//		long dot = (bax*cbx)+(bay*cby);
//		long m1 = (bax*bax)+(bay*bay);
//		long m2 = (cbx*cbx)+(cby*cby);
		if(d1!=d2)
			out.println("No");
		else if(bay*cbx==bax*cby)
			out.println("No");
		else
			out.println("Yes");

	}

	void run() throws Exception
	{
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		if (!INPUT.isEmpty())
			tr(System.currentTimeMillis() - s + "ms");
	}

	public static void main(String[] args) throws Exception
	{
		new Thread(null, new Runnable()
		{
			public void run()
			{
				try
				{
					new B851().run();
				} catch (Exception e)
				{
					e.printStackTrace();
				}
			}
		}, "1", 1 << 26).start();
	}

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf)
		{
			ptrbuf = 0;
			try
			{
				lenbuf = is.read(inbuf);
			} catch (IOException e)
			{
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c)
	{
		return !(c >= 33 && c <= 126);
	}

	private int skip()
	{
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd()
	{
		return Double.parseDouble(ns());
	}

	private char nc()
	{
		return (char) skip();
	}

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b)))
		{ // when nextLine, (isSpaceChar(b) && b !=
				// ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b)))
		{
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			} else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			} else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private void tr(Object... o)
	{
		System.out.println(Arrays.deepToString(o));
	}
}

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner scan=new Scanner(System.in);
		int x1=scan.nextInt();
		int y1=scan.nextInt();
		int x2=scan.nextInt();
		int y2=scan.nextInt();
		int x3=scan.nextInt();
		int y3=scan.nextInt();
		long d1=(long)(x2-x1)*(x2-x1)+(long)(y2-y1)*(y2-y1);
		long d2=(long)(x3-x2)*(x3-x2)+(long)(y3-y2)*(y3-y2);
		long m1=(long)(y3-y2)*(x2-x1);
		long m2=(long)(x3-x2)*(y2-y1);
         if(d1==d2 && m1!=m2) System.out.println("Yes");
		 else  System.out.println("No" );

	}
}

import java.util.*;
import java.lang.*;
import java.io.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.x=x;
            this.y=y;
        }
    }
    static double sqrt(long num){
        int c1=0,c2=0;
        double a=(double)num;
        double ans=0;
        long start=0,end=(long)a;
        while(start<=end){
            c1++;
            long mid=(start+end)/2;
            if((mid*mid)==(long)a){
                ans=mid;
                break;
            }
            else if((mid*mid)<a){
                start=mid+1;
                ans=(double)mid;
            }
            else{
                end=mid-1;
            }
        }
        double res=ans;
        double res1=0;
        while(res1!=res){
            c2++;
            res1=res;
            res=(res+(a/res))/2;
        }
        return res;
    }
    static double dist(long a,long b,long c,long d){
        double ans=sqrt((a-c)*(a-c)+(b-d)*(b-d));
        return ans;
    }
    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        long a=sc.ni(),b=sc.ni(),c=sc.ni(),d=sc.ni(),e=sc.ni(),f=sc.ni();
        long r=a*(d-f)-c*(b-f)+e*(b-d);
        long ab=(a-c)*(a-c)+(b-d)*(b-d);
        long bc=(c-e)*(c-e)+(d-f)*(d-f);
        w.println(r!=0&&ab==bc?"YES":"NO");
        w.close();
    }
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Main {

	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[256]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

	static long power(long a,long k)
	{
		long m = 1000000007;
	    long ans=1;
	    long tmp=a%m;
	    while(k>0)
	    {
	        if(k%2==1)
	        	ans=ans*tmp%m;
	        tmp=tmp*tmp%m;
	        k>>=1;
	    }
	    return ans;
	}

	public static void main(String args[])throws IOException{
		Reader in = new Reader();
		Scanner sc = new Scanner(System.in);
		/*int n = in.nextInt();
		int[][] p = new int[n][5];
		for(int i=0;i<n;i++){
			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();
			int d = in.nextInt();
			int e = in.nextInt();
			p[0][0]=a;
			p[0][1]=b;
			p[0][2]=c;
			p[0][3]=d;
			p[0][4]=e;
		}
		int s[][][] = new int[n][n][5];
		int m[][] = new int[n][n];
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				if(i==j)
					continue;
				s[i][j][0]=p[i][0]+p[j][0];
				s[i][j][1]=p[i][1]+p[j][1];
				s[i][j][2]=p[i][2]+p[j][2];
				s[i][j][3]=p[i][3]+p[j][3];
				s[i][j][4]=p[i][4]+p[j][4];
				m[i][j]=p[i][0]*p[j][0]+p[i][1]*p[j][1]+p[i][2]*p[j][2]+p[i][3]*p[j][3]+p[i][4]*p[j][4];
			}
		}
		for(int i=0;i<n;i++){

		}*/

		double ax = in.nextDouble();
		double ay = in.nextDouble();
		double bx = in.nextDouble();
		double by = in.nextDouble();
		double cx = in.nextDouble();
		double cy = in.nextDouble();
		if((by-ay)*(cx-bx)==(cy-by)*(bx-ax)){
			System.out.println("No");
			System.exit(0);
		}

		if((by-cy)*(by-cy)+(bx-cx)*(bx-cx)==(ay-by)*(ay-by)+(ax-bx)*(ax-bx))
			System.out.println("Yes");
		else
			System.out.println("No");
	}

	static int mod=1000000007;
}

import java.io.*;    //PrintWriter
import java.math.*;  //BigInteger, BigDecimal
import java.util.*;  //StringTokenizer, ArrayList

public class R432_Div2_B
{
	FastReader in;
	PrintWriter out;

	public static void main(String[] args)  {
		new R432_Div2_B().run();
	}

	void run()
	{
		in = new FastReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	void solve()
	{
		int ax = in.nextInt();
		int ay = in.nextInt();
		int bx = in.nextInt();
		int by = in.nextInt();
		int cx = in.nextInt();
		int cy = in.nextInt();

		long ab = dist(ax,ay,bx,by);
		long bc = dist(bx,by,cx,cy);
		long ca = dist(cx,cy,ax,ay);

		if (ab == bc && ab + bc <= ca)
			out.println("Yes");
		else
			out.println("No");
	}

	private long dist(int ax, int ay, int bx, int by) {
		return 1L * (ax - bx) * (ax - bx) + 1L * (ay - by) * (ay - by);
	}

	//-----------------------------------------------------
	void runWithFiles() {
		in = new FastReader(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		solve();
		out.close();
	}

	class FastReader
	{
	    BufferedReader br;
	    StringTokenizer tokenizer;

	    public FastReader(InputStream stream)
	    {
	        br = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }
		public FastReader(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
				tokenizer = null;
			}
			catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

	    private String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens())
	            try {
	            	tokenizer = new StringTokenizer(br.readLine());
	            }
	            catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        return tokenizer.nextToken();
	    }
		public String nextLine() {
			try	{
				return br.readLine();
			}
			catch(Exception e) {
				throw(new RuntimeException());
			}
		}

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }
	    BigInteger nextBigInteger() {
	        return new BigInteger(next());
	    }
	    BigDecimal nextBigDecimal() {
	        return new BigDecimal(next());
	    }
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author HossamDoma
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int ax = in.nextInt();
            int ay = in.nextInt();

            int bx = in.nextInt();
            int by = in.nextInt();

            int cx = in.nextInt();
            int cy = in.nextInt();

            double ab = Math.sqrt((long) (ax - bx) * (ax - bx) + (long) (ay - by) * (ay - by));
            double bc = Math.sqrt((long) (bx - cx) * (bx - cx) + (long) (by - cy) * (by - cy));
            long ac = (long) (ax - cx) * (ax - cx) + (long) (ay - cy) * (ay - cy);

            // out.println(ab + " " + ac + " " + bc);

            if (ab != bc || ac == ac * (ab + bc)) {
                out.println("No");
            } else
                out.println("Yes");
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package geomexam;

import java.util.*;
import java.io.*;

public class Geomexam {

    static double dist(long ax, long ay, long bx , long by){
        return Math.sqrt(Math.pow(ax-bx,2) + Math.pow(ay-by, 2));
    }

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        long Ax = Integer.parseInt(st.nextToken());
        long Ay = Integer.parseInt(st.nextToken());
        long Bx = Integer.parseInt(st.nextToken());
        long By = Integer.parseInt(st.nextToken());
        long Cx = Integer.parseInt(st.nextToken());
        long Cy = Integer.parseInt(st.nextToken());

        double distA = dist(Bx,By,Cx,Cy);
        double distB = dist(Ax,Ay,Cx,Cy);
        double distC = dist(Ax,Ay,Bx,By);

        double top = Math.pow(distA, 2) + Math.pow(distB, 2) - Math.pow(distC, 2);
        double bottom = 2 * distA * distB;

        double angleC = Math.abs(Math.toDegrees(Math.acos((top+0.000001)/(bottom+0.000001))));

        top = Math.pow(distC, 2) + Math.pow(distB, 2) - Math.pow(distA, 2);
        bottom = 2 * distC * distB;
//        System.out.println(bottom);
//        System.out.println(top/bottom);
//        System.out.println(top+0.000001/bottom+0.000001);
        double angleA = Math.abs(Math.toDegrees(Math.acos((top+0.000001)/(bottom+0.000001))));
        ///System.out.println(angleC + " " + angleA);
//        System.out.println(distA + " " + distB + " " + distC);

//        double angle = (Math.toDegrees(Math.atan2(By, Bx)) + 360.0)%360.0 - (Math.toDegrees(Math.atan2(Ay, Ax)) + 360.0)%360.0;
//        angle = (angle + 360)%360;
//        //System.out.println(angle);
//        double angle2 = (Math.toDegrees(Math.atan2(Cy, Cx)) + 360.0)%360.0 - (Math.toDegrees(Math.atan2(By, Bx)) + 360.0)%360.0;
//        angle2 = (angle2 + 360)%360;
        //System.out.println(angle2);
        if( Math.abs(distA - distC) < 0.0001){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }

}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        int ax = in.nextInt();
        int ay = in.nextInt();
        int bx = in.nextInt();
        int by = in.nextInt();
        int cx = in.nextInt();
        int cy = in.nextInt();
        int r1 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
        int r2 = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
//        double k1 = (by - ay);
//        k1 /= (bx - ax);
//        double k2 = (cy - by);
//        k2 /= (cx - bx);
//        if (Math.abs(k1) == Math.abs(k2)) {
//            System.out.println("No");
//            return;
//        }
        if (r1 == r2) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class B {

	static long sq(long x) {
		return x * x;
	}

	static class Point {
		long x, y;

		Point(int a, int b) {
			x = a;
			y = b;
		}

		long dist2(Point p) {
			return sq(x - p.x) + sq(y - p.y);
		}

		@Override
		public String toString() {
			return x + " " + y;
		}
	}

	public static void main(String[] args) throws IOException {
		MyScanner sc = new MyScanner(System.in);
		Point a = new Point(sc.nextInt(), sc.nextInt()), b = new Point(sc.nextInt(), sc.nextInt()),
				c = new Point(sc.nextInt(), sc.nextInt());
		if (a.dist2(b) == b.dist2(c))
			System.out.println("Yes");
		else
			System.out.println("No");
	}

	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
		}

		public MyScanner(String filename) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(new File(filename)));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class B {

	public static void main(String[] args)  {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int[] x = new int[3];
		int[] y = new int[3];
		x[0] = scan.nextInt(); y[0] = scan.nextInt();
		x[1] = scan.nextInt(); y[1] = scan.nextInt();
		x[2] = scan.nextInt(); y[2] = scan.nextInt();
		if(Math.abs(dist(x[0], y[0], x[1], y[1])-dist(x[1], y[1], x[2], y[2])) < 0.00001) out.println("Yes");
		else out.println("No");
		out.close();
	}

	static double dist(int x, int y, int xx, int yy) {
		return Math.sqrt(Math.pow(x-xx, 2)+Math.pow(y-yy, 2));
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.util.*;
import java.io.*;
import java.lang.*;
public class Solution{
    static double calcDist(int a,int b,int c,int d){
        return Math.sqrt(((c-a)*(c-a)+(d-b)*(d-b)));
    }
    public static void main(String[] args){

    Scanner in = new Scanner(System.in);
    int ax = in.nextInt();
    int ay = in.nextInt();
    int bx = in.nextInt();
    int by = in.nextInt();
    int cx = in.nextInt();
    int cy = in.nextInt();

    double distab = calcDist(ax,ay,bx,by);
    double distbc = calcDist(bx,by,cx,cy);
    double distac = calcDist(ax,ay,cx,cy);
    if(distab+distac>distbc&&distbc+distab>distac&&distac+distbc>distab){
        if(distab==distbc){System.out.println("Yes");}
        else{System.out.println("No");}
    }

    else System.out.println("No");

    }
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

 public static boolean isStraight(long x1,long y1,long x2,long y2,long x3,long y3)
 {
     double slope1=(y2-y1)/(x2-x1);
     double slope2=(y3-y2)/(x3-x2);
     if(slope1!=slope2)
         return false;
     else
         return true;
 }
 public static void main(String[] args) {
     try{
         Scanner s1 = new Scanner(System.in);
         long x1=s1.nextLong();
         long y1=s1.nextLong();
         long x2=s1.nextLong();
         long y2=s1.nextLong();
         long x3=s1.nextLong();
         long y3=s1.nextLong();
         double dist1=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
         dist1=Math.sqrt(dist1);
         double dist2=(x2-x3)*(x2-x3)+(y2-y3)*(y2-y3);
         dist2=Math.sqrt(dist2);
         if(isStraight(x1,y1,x2,y2,x3,y3) || (dist1!=dist2))
             System.out.println("No");
         else
             System.out.println("Yes");
     }
     catch(Exception e)
     {}

   }
}

import java.util.*;
import java.io.*;

public final class Main {

    public static void main(String[] args) throws Exception {
        PrintWriter pw = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());

        long ax = Long.parseLong(st.nextToken());
        long ay = Long.parseLong(st.nextToken());
        long bx = Long.parseLong(st.nextToken());
        long by = Long.parseLong(st.nextToken());
        long cx = Long.parseLong(st.nextToken());
        long cy = Long.parseLong(st.nextToken());

        if(ax == bx && bx == cx || ay == by && by == cy){
            System.out.println("No");
            return;
        }

        if((Math.pow(Math.abs(ax-bx) ,2) + Math.pow(Math.abs(ay-by), 2)) !=
                (Math.pow(Math.abs(cx-bx) ,2) + Math.pow(Math.abs(cy-by), 2))){
            System.out.println("No");
            return;
        }
        //distance from a to b must be same as b to c but they cannot all lie on the same plane
        //ie the slope from a to b and b to c cannot be equal
        if((ax-bx) == 0 && (bx-cx) == 0){
            System.out.println("No");
            return;
        }else if((ax-bx) == 0 || (bx-cx) == 0){
            System.out.println("Yes");
            return;
        }
        double aToBSlope = (double)(ay-by)/(ax-bx);
        double bToCSlope = (double)(by-cy)/(bx-cx);

        pw.println(aToBSlope == bToCSlope ? "No" : "Yes");
        pw.close();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Debabrata
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ArpaAndExamAboutGeometry solver = new ArpaAndExamAboutGeometry();
        solver.solve(1, in, out);
        out.close();
    }

    static class ArpaAndExamAboutGeometry {
        public void solve(int testNumber, InputReader scan, OutputWriter out) {
            long x1 = scan.nextLong();
            long y1 = scan.nextLong();
            long x2 = scan.nextLong();
            long y2 = scan.nextLong();
            long x3 = scan.nextLong();
            long y3 = scan.nextLong();
            double m1 = (y2 - y1) / (double) (x2 - x1);
            double m2 = (y3 - y2) / (double) (x3 - x2);
            if (m1 == m2) {
                out.println("No");
                return;
            }
            out.println("Yes");
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}

import java.util.Scanner;
public class P851B
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int ax = scan.nextInt();
		int ay = scan.nextInt();
		int bx = scan.nextInt();
		int by = scan.nextInt();
		int cx = scan.nextInt();
		int cy = scan.nextInt();
		Point a = new Point(ax, ay);
		Point b = new Point(bx, by);
		Point c = new Point(cx, cy);
		Point p = new Line(a, b).dropPerpen(midPoint(a, b)).intersection(new Line(b, c).dropPerpen(midPoint(b, c)));
		if (p == null)
		{
			System.out.println("No");
			return;
		}
		Vector va = new Vector(p, a);
		Vector vb = new Vector(p, b);
		Vector vc = new Vector(p, c);
		if (!equal(va.angleBetween(vb), vb.angleBetween(vc)))
			System.out.println("No");
		else
			System.out.println("Yes");
	}
	static double epsilon = 1e-10;
	static boolean equal(double a, double b)
	{
		return Math.abs(a-b) < epsilon;
	}
	static Point midPoint(Point a, Point b)
	{
		return new Point((a.x+b.x)/2, (a.y+b.y)/2);
	}
	static class Point
	{
		double x, y;
		Point(double a, double b)
		{
			x = a;
			y = b;
		}
		public boolean equals(Point p)
		{
			return equal(x, p.x) && equal(y, p.y);
		}
	}
	static class Vector
	{
		double x, y;
		Vector(double a, double b)
		{
			x = a;
			y = b;
		}
		Vector(Point p1, Point p2)
		{
			this(p2.x-p1.x, p2.y-p1.y);
		}
		double angleBetween(Vector v) // Angle between vectors
		{
			return Math.acos(dot(v)/(magnitude()*v.magnitude()));
		}
		double direction() // Returns the angle of the vector (between 0 and 2*pi)
		{
			if (x < 0)
				return Math.atan(y/x)+Math.PI;
			if (y < 0)
				return Math.atan(y/x)+2*Math.PI;
			return Math.atan(y/x);
		}
		double dot(Vector v) // Dot product
		{
			return x*v.x + y*v.y;
		}
		double magnitude() // Magnitude of the vector (distance)
		{
			return Math.sqrt(x*x + y*y);
		}
	}
	static class Line
	{
		double a, b, c; // Standard form equation of line: ax + by = c
		Line(Point p1, Point p2)
		{
			a = p1.y - p2.y;
			b = p2.x - p1.x;
			c = a*p1.x + b*p1.y;
		}
		Line(double aa, double bb, double cc)
		{
			a = aa;
			b = bb;
			c = cc;
		}
		boolean isParallel(Line li) // Works even if either is vertical
		{
			return equal(a*li.b, li.a*b);
		}
		Point intersection(Line li) // Returns null if line is parallel
		{
			if (isParallel(li))
				return null;
			double det = a*li.b - li.a*b;
			double xx = (li.b*c - b*li.c) / det;
			double yy = (a*li.c - li.a*c) / det;
			return new Point(xx, yy);
		}
		Line dropPerpen(Point p) // Drops a perpendicular line at point p
		{
			return new Line(-b, a, -b*p.x + a*p.y);
		}
	}
}

import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.StringTokenizer;
public class BCF432A {
    public static void main(String[]args)throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine());
        int a1=Integer.parseInt(st.nextToken());
        int a2=Integer.parseInt(st.nextToken());
        int b1=Integer.parseInt(st.nextToken());
        int b2=Integer.parseInt(st.nextToken());
        int c1=Integer.parseInt(st.nextToken());
        int c2=Integer.parseInt(st.nextToken());
        long d1=dist(a1,a2,b1,b2);
        long d2=dist(b1,b2,c1,c2);
//        System.out.println(d1+" "+d2);
        if(d1!=d2)
            System.out.println("No");
        else
        {
            System.out.println("Yes");
        }
    }
    static Long dist(long a,long b,long c,long d)
    {
        long dd=((a-c)*(a-c))+((b-d)*(b-d));
        return dd;
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Ajay {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			return str;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		BigInteger nextBigIntger() {
			BigInteger bb = new BigInteger(next());
			return bb;
		}
	}

	public static void main(String[] args) {
		FastReader sc = new FastReader();
		long a1 = sc.nextLong();
		long a2 = sc.nextLong();
		long b1 = sc.nextLong();
		long b2 = sc.nextLong();
		long c1 = sc.nextLong();
		long c2 = sc.nextLong();
		double ab = Math.sqrt(Math.abs(a1-b1)*Math.abs(a1-b1)+Math.abs(a2-b2)*Math.abs(a2-b2));
		double bc = Math.sqrt(Math.abs(b1-c1)*Math.abs(b1-c1)+Math.abs(b2-c2)*Math.abs(b2-c2));
		double ca =  Math.sqrt(Math.abs(c1-a1)*Math.abs(c1-a1)+Math.abs(c2-a2)*Math.abs(c2-a2));
		if((ab==bc || bc==ca)  ||(ab==bc && bc==ca && ca==ab))
			System.out.println("Yes");
		 else
			System.out.println("No");
	}
}

/**
 * Created by Aminul on 9/4/2017.
 */

import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class CF851B {
    public static int index;
    public static void main(String[] args)throws Exception {
        InputReader in = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
        //int n = in.nextInt();
        P a = new P(in.nextDouble(), in.nextDouble());
        P b = new P(in.nextDouble(), in.nextDouble());
        P c = new P(in.nextDouble(), in.nextDouble());

        P center = findCenter(a, b, c);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(a, c, b);

    //    debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(b, a, c);

     //   debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(b, c, a);

   //     debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(c, a, b);

      //  debug(center);

        if(isNaN(center.x) || isNaN(center.y)) center = findCenter(c, b, a);

      //  debug(center);
        //debug(center.x, center.y, center.x == 0.0/0.0, isNaN(center.x)) ;

        double d1 = a.distSq(b);
        double d2 = b.distSq(c);
       // double d3 = c.distSq(a);

        double ang1 = fixAng(getAngle(center, a) - getAngle(center, b));
        double ang2 = fixAng( getAngle(center, b) - getAngle(center, c));

      //  debug(getAngle(center, a), getAngle2(center, a));
      //  debug(getAngle(center, c), getAngle2(center, c));

      //  debug(center, d1, d2, ang1, ang2, getAngle(center, a), getAngle(center,b), getAngle(center, c));

        if(!isNaN(center.x) && !isNaN(center.y) && Math.abs(d1 - d2) <= EPS && Math.abs(ang1 - ang2) <= EPS ) pw.println("YES");
        else pw.println("NO");

        pw.close();
    }

    static double fixAng(double a){
        if( a < 0){
            return 360+a;
        }
        return a;
    }

    static public boolean isNaN(double v) {
        return (v != v) || v == 1/0.0 || v == 0/0.0;
    }

    static P findCenter(P a, P b, P c){
        P cen = new P(0, 0);
        double XMid1= (a.x + b.x) / 2;
        double XMid2= (a.x + c.x) / 2;

        double YMid1= (a.y + b.y) / 2;
        double YMid2= (a.y + c.y) / 2;

        double Slope1= (a.x - b.x) / (b.y - a.y);
        double Slope2= (a.x - c.x) / (c.y - a.y);

        double Perp1 = YMid1 - (Slope1 * XMid1);
        double Perp2= YMid2 - (Slope2 * XMid2);

        cen.x = (Perp1 - Perp2) / (Slope2 - Slope1);
        cen.y = Perp1 + (Slope1 * cen.x);

        return cen;
    }

    static P circleCenter(P A, P B, P C) {
        double yDelta_a = B.y - A.y;
        double xDelta_a = B.x - A.x;
        double yDelta_b = C.y - B.y;
        double xDelta_b = C.x - B.x;
        P center = new P(0, 0);

        debug(yDelta_a, yDelta_b, xDelta_a, xDelta_b);

        double aSlope = yDelta_a/xDelta_a;
        double bSlope = yDelta_b/xDelta_b;
        center.x = (aSlope*bSlope*(A.y - C.y) + bSlope*(A.x + B.x)
                - aSlope*(B.x+C.x) )/(2* (bSlope-aSlope) );
        center.y = -1*(center.x - (A.x+B.x)/2)/aSlope +  (A.y+B.y)/2;

        return center;
    }

    static double getAngle2(P a, P b){
        double dot = a.dot(b);
        double av = a.abs(), bv = b.abs();

        double ang = Math.acos(dot / (av*bv));

        ang = ang*180/Math.PI;

        if(ang < 0){
            ang += 360;
        }

        return ang;

    }

    public static double getAngle(P a, P target) {
        double angle = (float) Math.toDegrees(Math.atan2(target.y - a.y, target.x - a.x));

        if(angle < 0){
            angle += 360;
        }

        return angle;
    }

    static double dist(double x1, double y1, double x2, double y2){
        double x = x1-x2, y = y1-y2;
        return Math.sqrt(x*x + y*y);
    }

    static double EPS = 1e-9;

    static class P {
        double x, y;
        P(double x, double y) {
            this.x = x;
            this.y = y;
        }

        double dist(P p){
            double xx = x - p.x;
            double yy = y - p.y;
            return Math.sqrt(xx*xx + yy*yy);
        }

        double distSq(P p){
            double xx = x - p.x;
            double yy = y - p.y;
            return xx*xx + yy*yy;
        }

        P add(P p) {
            return new P(x + p.x, y + p.y);
        }
        P sub(P p) {
            return new P(x - p.x, y - p.y);
        }
        P mul(double d) {
            return new P(x * d, y * d);
        }
        P div(double d) {
            return new P(x / d, y / d);
        }
        double dot(P p) {
            return x * p.x + y * p.y;
        }
        double det(P p) {
            return x * p.y - y * p.x;
        }
        double crossProduct(P that) {
            return this.det(that);
        }
        double abs() {
            return Math.sqrt(abs2());
        }
        double abs2() {
            return x * x + y * y;
        }
        P rot90() {
            return new P(-y, x);
        }
        public String toString() {
            return String.format("(%.2f, %.2f)", x, y);
        }
    }

    static double rad(P p1,P p2){
        return Math.atan2(p1.det(p2),p1.dot(p2));
    }

    static void debug(Object...obj) {
        System.err.println(Arrays.deepToString(obj));
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        //InputReader in = new InputReader(new FileReader("File_Name"));
        public InputReader(FileReader file) {
            reader = new BufferedReader(file);
            tokenizer = null;
        }

        public String next() {

            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                return null;
            }

            return tokenizer.nextToken();
        }

        public String nextLine() {
            String line = null;
            try {
                tokenizer = null;
                line =  reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
        public boolean hasNext(){
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            }
            catch (Exception e) {
                return false;
            }

            return true;

        }
    }
}

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;

public class Main {
	//////
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	//////

	public static float dist(int x1,int y1,int x2,int y2){
		return (float)Math.pow((Math.pow(Math.abs(x2-x1),2)+Math.pow(Math.abs(y2-y1),2)),0.5);
	}
	public static void main(String[] args) throws IOException {

		FastReader scan = new FastReader();

		int x1=scan.nextInt();
		int y1=scan.nextInt();
		int x2=scan.nextInt();
		int y2=scan.nextInt();
		int x3=scan.nextInt();
		int y3=scan.nextInt();

		//System.out.println(dist(x1,y1,x3,y3));
		//System.out.println(dist(x1,y1,x2,y2));
		//System.out.println(dist(x2,y2,x3,y3));

		if(dist(x1,y1,x3,y3)==dist(x1,y1,x2,y2)+dist(x2,y2,x3,y3)){
			System.out.println("NO");return;
		}

		if(dist(x1,y1,x2,y2)==dist(x2,y2,x3,y3)){
			System.out.println("YES");
		}else
			System.out.println("NO");

	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Debabrata
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        InitialBet solver = new InitialBet();
        solver.solve(1, in, out);
        out.close();
    }

    static class InitialBet {
        public void solve(int testNumber, InputReader scan, OutputWriter out) {
            int sum = 0;
            for (int i = 0; i < 5; i++) {
                sum += scan.nextInt();
            }
            out.println(sum % 5 == 0 ? sum / 5 : -1);
            //
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(int i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import static java.lang.Double.parseDouble;
import static java.lang.Double.valueOf;
import static java.lang.Long.max;
import static java.lang.Long.min;
import static java.lang.Integer.max;
import static java.lang.Integer.min;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.StrictMath.abs;
import static java.lang.System.err;
import static java.lang.System.exit;
import static java.util.Arrays.sort;

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

public class A {

    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;

    static final double TOL = 0.0000001;

    static double dist(int x1, int y1, int x2, int y2) {
        return Math.sqrt( 1L * (x1 - x2) * (x1 - x2) + 1L * (y1 - y2) * (y1 - y2) );
    }

    static void solve() throws Exception {
        int p1x = nextInt(), p1y = nextInt(), p2x = nextInt(), p2y = nextInt(), p3x = nextInt(), p3y = nextInt();
        long det =  1L * (p1x - p2x) * (p2y - p3y) - 1L * (p2x - p3x)* (p1y - p2y);
        if (det == 0) out.println("No");
        else {
            if(dist(p1x,p1y,p2x,p2y) != dist(p3x,p3y,p2x,p2y)) out.print("No");
            else out.println("Yes");
        }
    }

    public static int[] convertIntegers(List<Integer> integers) {
        int[] ret = new int[integers.size()];
        for (int i = 0; i < ret.length; i++) {
            ret[i] = integers.get(i).intValue();
        }
        return ret;
    }

    public static int lower_bound(int[] nums, int target) {
        int low = 0, high = nums.length - 1;
        while (low < high) {
            int mid = low + (high - low) / 2;
            if (nums[mid] < target)
                low = mid + 1;
            else
                high = mid;
        }
        return nums[low] == target ? low : -1;
    }

    public static int upper_bound(int[] nums, int target) {
        int low = 0, high = nums.length - 1;
        while (low < high) {
            int mid = low + (high + 1 - low) / 2;
            if (nums[mid] > target)
                high = mid - 1;
            else
                low = mid;
        }
        return nums[low] == target ? low : -1;
    }

    static int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static char nextChar() throws IOException {
        return next().toCharArray()[0];
    }

    static int nextInt() throws IOException {
        return parseInt(next());
    }

    static long nextLong() throws IOException {
        return parseLong(next());
    }

    static double nextDouble() throws IOException {
        return parseDouble(next());
    }

    static String next() throws IOException {
        while (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    public static void main(String[] args) {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(new OutputStreamWriter(System.out));
            solve();
            long lEndTime = System.currentTimeMillis();
            //System.out.println("Elapsed time in seconds: " + (double)(lEndTime - lStartTime) / 1000.0);
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
            exit(1);
        }
    }
}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        long ax = in.nextLong();
        long ay = in.nextLong();
        long bx = in.nextLong();
        long by = in.nextLong();
        long cx = in.nextLong();
        long cy = in.nextLong();
        if (ax == bx && ax == cx && ay == by && ay == cy) {
            System.out.println("Yes");
            return;
        }
        long r1 = (ax - bx) * (ax - bx);
        r1 += (ay - by) * (ay - by);
        long r2 = (bx - cx) * (bx - cx);
        r2 += (by - cy) * (by - cy);
        double k1 = (by - ay);
        k1 /= (bx - ax);
        double k2 = (cy - by);
        k2 /= (cx - bx);
        if (ax == bx && ay == by) {
            System.out.println("No");
            return;
        }
        if (bx == cx && by == cy) {
            System.out.println("No");
            return;
        }
        if (ax == cx && ay == cy) {
            System.out.println("Yes");
            return;
        }

        if (Math.abs(k1) == Math.abs(k2) && Math.abs(k1) >= 0.00000000001) {
            System.out.println("No");
            return;
        }
        if (r1 == r2) {
            System.out.println("Yes");
            return;
        }
        System.out.println("No");
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        long ax = in.nextLong();
        long ay = in.nextLong();
        long bx = in.nextLong();
        long by = in.nextLong();
        long cx = in.nextLong();
        long cy = in.nextLong();
        if (ax == bx && ax == cx && ay == by && ay == cy) {
            System.out.println("Yes");
            return;
        }
        long r1 = (ax - bx) * (ax - bx);
        r1 += (ay - by) * (ay - by);
        long r2 = (bx - cx) * (bx - cx);
        r2 += (by - cy) * (by - cy);
        double k1 = (by - ay);
        k1 /= (bx - ax);
        double k2 = (cy - by);
        k2 /= (cx - bx);
        if (ax == bx && ay == by) {
            System.out.println("No");
            return;
        }
        if (bx == cx && by == cy) {
            System.out.println("No");
            return;
        }
        if (ax == cx && ay == cy) {
            System.out.println("Yes");
            return;
        }
        if (r1 == r2) {
            System.out.println("Yes");
            return;
        }
        if (Math.abs(k1) == Math.abs(k2) && k1 >= 0.0000000000000001) {
            System.out.println("No");
            return;
        }
        System.out.println("No");
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.io.*;
import java.util.*;

public class Ques2 {

    static class Scan {

        private final InputStream inputStream;
        private final byte[] buffer = new byte[1024];
        private int currentChar;
        private int numChars;
        private SpaceCharFilter filter;

        public Scan() {
            inputStream = System.in;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (currentChar >= numChars) {
                currentChar = 0;
                try {
                    numChars = inputStream.read(buffer);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buffer[currentChar++];
        }

        public String nextLine() {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String str = "";

            try {
                str = br.readLine();
            }
            catch (IOException e) {
            }
            return str;
        }

        public int nextInt() {
            int ch = read();

            while(isSpaceChar(ch))
                ch = read();

            int sgn = 1;

            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            int res = 0;
            do {
                if(ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res * sgn;
        }

        public long nextLong() {
            int ch = read();

            while (isSpaceChar(ch))
                ch = read();

            int sgn = 1;

            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            long res = 0;

            do {
                if (ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res * sgn;
        }

        public double nextDouble() {
            int ch = read();

            while (isSpaceChar(ch))
                ch = read();

            int sgn = 1;
            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            double res = 0;
            while (!isSpaceChar(ch) && ch != '.') {
                if (ch == 'e' || ch == 'E')
                    return res * Math.pow(10, nextInt());
                if (ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            if (ch == '.') {
                ch = read();
                double m = 1;
                while (!isSpaceChar(ch)) {
                    if (ch == 'e' || ch == 'E')
                        return res * Math.pow(10, nextInt());
                    if (ch < '0' || ch > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (ch - '0') * m;
                    ch = read();
                }
            }

            return res * sgn;
        }

        public String readString() {
            int ch = read();
            while (isSpaceChar(ch))
                ch = read();

            StringBuilder res = new StringBuilder();

            do {
                res.appendCodePoint(ch);
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res.toString();
        }

        public boolean isSpaceChar(int ch) {
            if (filter != null)
                return filter.isSpaceChar(ch);
            return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t' || ch == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static class Print {
        private final BufferedWriter bw;

        public Print() {
            this.bw=new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void print(Object object)throws IOException {
            bw.append(""+object);
        }

        public void println(Object object)throws IOException {
            print(object);
            bw.append("\n");
        }

        public void close()throws IOException {
            bw.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Scan sc = new Scan();
        Print pr = new Print();

        long ax, ay, bx, by, cx, cy;
        ax=sc.nextInt();
        ay=sc.nextInt();
        bx=sc.nextInt();
        by=sc.nextInt();
        cx=sc.nextInt();
        cy=sc.nextInt();

        long mat[][] = new long[3][3];

        mat[0][0]=ax;
        mat[0][1]=ay;
        mat[0][2]=1;
        mat[1][0]=bx;
        mat[1][1]=by;
        mat[1][2]=1;
        mat[2][0]=cx;
        mat[2][1]=cy;
        mat[2][2]=1;

        long det;

        det = mat[0][0]*(mat[1][1]*mat[2][2]-mat[2][1]*mat[1][2]) - mat[0][1]*(mat[1][0]*mat[2][2]-mat[1][2]*mat[2][0]) + mat[0][2]*(mat[1][0]*mat[2][1]-mat[1][1]*mat[2][0]);

        if(det==0)
            pr.println("No");
        else
            pr.println("Yes");

        pr.close();

    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;

public class B {

    static PrintWriter out = new PrintWriter(System.out);
    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{
        String[] ar= reader.readLine().split(" ");
        long ax = Long.valueOf(ar[0]);
        long ay = Long.valueOf(ar[1]);
        long bx = Long.valueOf(ar[2]);
        long by = Long.valueOf(ar[3]);
        long cx = Long.valueOf(ar[4]);
        long cy = Long.valueOf(ar[5]);

        if (    judge(ax, ay, bx, by, cx, cy) ||
                judge(cx, cy, bx, by, ax, ay) ||
                judge(ax, ay, cx, cy, bx, by) ||
                judge(bx, by, cx, cy, ax, ay) ||
                judge(cx, cy, ax, ay, bx, by) ||
                judge(bx, by, ax, ay, cx, cy)) System.out.println("Yes");
        else System.out.println("No");
    }

    static boolean judge(long ax, long ay, long bx, long by, long cx, long cy){
        long a = ay - by, b = ax - bx, c = cy - by , d = cx - bx;
        if (a * a + b * b != c * c + d *d){
            return false;
        }
        if(b != 0 && d != 0) {
            if (a / b != c / d || a % b != c % d) {
                return false;
            }
            return true;
        }
        if (ay != by || by != cy) return true;
        return false;
    }
}

//package que_a;

import java.io.*;
import java.util.*;

public class utkarsh {

    InputStream is;
    PrintWriter out;

    long inf = (long) (1e15);
    boolean SHOW_TIME;

    void solve() {
        //Enter code here utkarsh
        //SHOW_TIME = true;
        double x1 = nd(), y1 = nd();
        double x2 = nd(), y2 = nd();
        double x3 = nd(), y3 = nd();
        double m1 = inf;
        if(x1 != x2) m1 = (y2 - y1) / (x2 - x1);
        double m2 = inf;
        if(x2 != x3) m2 = (y3 - y2) / (x3 - x2);
        if(m1 == m2) {
            out.println("No");
        } else {
            out.println("Yes");
        }
    }

    //---------- I/O Template ----------

    public static void main(String[] args) { new utkarsh().run(); }
    void run() {
        is = System.in;
        out = new PrintWriter(System.out);
        long start = System.currentTimeMillis();
        solve();
        long end = System.currentTimeMillis();
        if(SHOW_TIME) out.println("\n" + (end - start) + " ms");
        out.flush();
    }

    byte input[] = new byte[1024];
    int len = 0, ptr = 0;

    int readByte() {
        if(ptr >= len) { ptr = 0;
            try { len = is.read(input); }
            catch(IOException e) { throw new InputMismatchException(); }
            if(len <= 0) { return -1; }
        } return input[ptr++];
    }
    boolean isSpaceChar(int c) { return !( c >= 33 && c <= 126 ); }
    int skip() {
        int b = readByte();
        while(b != -1 && isSpaceChar(b)) { b = readByte(); }
        return b;
    }

    char nc() { return (char)skip(); }
    String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!isSpaceChar(b)) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    String nLine() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while( !(isSpaceChar(b) && b != ' ') ) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    int ni() {
        int n = 0, b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        if(b == -1) { return -1; }  //no input
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }
    long nl() {
        long n = 0L;    int b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }

    double nd() { return Double.parseDouble(ns()); }
    float nf() { return Float.parseFloat(ns()); }
    int[] na(int n) {
        int a[] = new int[n];
        for(int i = 0; i < n; i++) { a[i] = ni(); }
        return a;
    }
    char[] ns(int n) {
        char c[] = new char[n];
        int i, b = skip();
        for(i = 0; i < n; i++) {
            if(isSpaceChar(b)) { break; }
            c[i] = (char)b; b = readByte();
        } return i == n ? c : Arrays.copyOf(c,i);
    }
}

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;

public class Main {
	//////
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	//////

	public static float dist(int x1,int y1,int x2,int y2){
		return (float)Math.pow((Math.pow(Math.abs(x2-x1),2)+Math.pow(Math.abs(y2-y1),2)),0.5);
	}
	public static void main(String[] args) throws IOException {

		FastReader scan = new FastReader();

		int x1=scan.nextInt();
		int y1=scan.nextInt();
		int x2=scan.nextInt();
		int y2=scan.nextInt();
		int x3=scan.nextInt();
		int y3=scan.nextInt();

		//System.out.println(dist(x1,y1,x3,y3));
		//System.out.println(dist(x1,y1,x2,y2));
		//System.out.println(dist(x2,y2,x3,y3));

		if(dist(x1,y1,x3,y3)==dist(x1,y1,x2,y2)+dist(x2,y2,x3,y3)){
			System.out.println("NO");return;
		}

		if(x2==0&&y2==0){
			if(dist(x1,y1,x2,y2)==dist(x2,y2,x3,y3)){
				System.out.println("YES");return;
			}
		}

		if(dist(x1,y1,x2,y2)==dist(x2,y2,x3,y3)){
			System.out.println("YES");
		}else
			System.out.println("NO");

	}

}

import java.io.*;
import java.math.*;
import java.util.*;

public class CODEFORCES
{
	private InputStream is;
	private PrintWriter out;

	double dis(long a,long b,long c,long d) {
		return Math.sqrt((a-c)*(a-c)+(b-d)*(b-d));
	}
	void solve()
	{
		int ax = ni(),ay = ni(),bx = ni(),by = ni(),cx = ni(),cy = ni();
		if(dis(ax,ay,bx,by)==dis(bx,by,cx,cy)) {
			if(Math.abs(Math.atan2(by-ay,bx-ax)-Math.atan2(by-cy, bx-cx))==Math.PI/2) {
				out.println("Yes");
			}
			else
				out.println("No");
		}
		else
			out.println("No");
	}

	void soln() throws Exception
	{
		is = System.in;
		out = new PrintWriter(System.out);
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis() - s + "ms");
	}

	public static void main(String[] args) throws Exception
	{
		new CODEFORCES().soln();
	}

	// To Get Input
	// Some Buffer Methods
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf)
		{
			ptrbuf = 0;
			try
			{
				lenbuf = is.read(inbuf);
			} catch (IOException e)
			{
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c)
	{
		return !(c >= 33 && c <= 126);
	}

	private int skip()
	{
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd()
	{
		return Double.parseDouble(ns());
	}

	private char nc()
	{
		return (char) skip();
	}

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b)))
		{ // when nextLine, (isSpaceChar(b) && b != '
			// ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b)))
		{
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			} else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-')
		{
			minus = true;
			b = readByte();
		}

		while (true)
		{
			if (b >= '0' && b <= '9')
			{
				num = num * 10 + (b - '0');
			} else
			{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

	private void tr(Object... o)
	{
		if (!oj)
			System.out.println(Arrays.deepToString(o));
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class B {

	public static void main(String[] args)  {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int[] x = new int[3];
		int[] y = new int[3];
		x[0] = scan.nextInt(); y[0] = scan.nextInt();
		x[1] = scan.nextInt(); y[1] = scan.nextInt();
		x[2] = scan.nextInt(); y[2] = scan.nextInt();
		if(Math.abs(dist(x[0], y[0], x[1], y[1])-dist(x[1], y[1], x[2], y[2])) < 0.00001 && !(x[0] == x[1] && x[1] == x[2] || y[0] == y[1] && y[1] == y[2])) out.println("Yes");
		else out.println("No");
		out.close();
	}

	static double dist(int x, int y, int xx, int yy) {
		return Math.sqrt(Math.pow(x-xx, 2)+Math.pow(y-yy, 2));
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.util.Scanner;

public class B851GeometryTest {

	public static class mPoint {
		public double x, y;
		public mPoint(int a, int b) {
			x = a;
			y = b;
		}
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		mPoint a = new mPoint(in.nextInt(), in.nextInt());
		mPoint b = new mPoint(in.nextInt(), in.nextInt());
		mPoint c = new mPoint(in.nextInt(), in.nextInt());

		if (a.x - b.x == 0 && b.x - c.x == 0) {
			System.out.println("No");
		} else if (a.x - b.x == 0 || b.x - c.x == 0) {
			if (equidis(a, b, c)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else if ((double)(a.y - b.y) / (a.x - b.x) == (double)(b.y - c.y) / (b.x - c.x)) {
			System.out.println("No");
		} else if (equidis(a, b, c)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

	public static boolean equidis(mPoint a, mPoint b, mPoint c) {
		return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y) ==
			   (b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y);
	}
}

//package c;

import java.util.Scanner;

public class Practice {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		double xa = in.nextDouble();
		double ya = in.nextDouble();
		double xb = in.nextDouble();
		double yb = in.nextDouble();
		double xc = in.nextDouble();
		double yc = in.nextDouble();
		double distance1 = Math.sqrt(Math.pow((xa-xb),2) + Math.pow((ya-yb), 2));
		double distance2 = Math.sqrt(Math.pow((xc-xb),2) + Math.pow((yc-yb), 2));
		if(distance1 - distance2 != 0) System.out.println("No");
		else {
			if((xa-xb)/(ya-yb) != (xa-xc)/(ya-yc))
				System.out.println("Yes");
			else System.out.println("No");
		}
		in.close();
	}

}

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.*;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;

public class Main
{
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    public static void main(String[] args) throws IOException{
        Reader in = new Reader();
        int a = in.nextInt();
        int a1 = in.nextInt();
        int b = in.nextInt();
        int b1 = in.nextInt();
        int c = in.nextInt();
        int c1 = in.nextInt();
        long x = (long) Math.pow(b1-a1, 2) + (long) Math.pow(b-a, 2);
        long y = (long) Math.pow(c1-b1, 2) + (long) Math.pow(c-b, 2);
        long z = (long) Math.pow(c1-a1, 2) + (long) Math.pow(c-a, 2);

        if(x==y && (b1-a1)*(c-b)!=(c1-b1)*(b-a)){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
}

import java.util.*;
import java.lang.*;
import java.io.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.x=x;
            this.y=y;
        }
    }
    static double sqrt(double num){
        int c1=0,c2=0;
        double a=(double)num;
        double ans=0;
        long start=0,end=(long)a;
        while(start<=end){
            c1++;
            long mid=(start+end)/2;
            if((mid*mid)==(long)a){
                ans=mid;
                break;
            }
            else if((mid*mid)<a){
                start=mid+1;
                ans=(double)mid;
            }
            else{
                end=mid-1;
            }
        }
        double res=ans;
        double res1=0;
        while(res1!=res){
            c2++;
            res1=res;
            res=(res+(a/res))/2;
        }
        return res;
    }

    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        double ax=sc.ni();
        double ay=sc.ni();
        double bx=sc.ni();
        double by=sc.ni();
        double cx=sc.ni();
        double cy=sc.ni();
        double a1=sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by));
        double a2=sqrt((bx-cx)*(bx-cx)+(by-cy)*(by-cy));
        w.println(a1==a2?"YES":"NO");
        w.close();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long ax = in.nextInt();
            long ay = in.nextInt();
            long bx = in.nextInt();
            long by = in.nextInt();
            long cx = in.nextInt();
            long cy = in.nextInt();

            boolean flg = (ax - bx) * (ax - bx) + (ay - by) * (ay - by) == (cx - bx) * (cx - bx) + (cy - by) * (cy - by);
            out.println(flg ? "Yes" : "No");
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }

    }
}

import javafx.geometry.Point2D;

import java.io.*;
import java.util.StringTokenizer;

public class CF {
    public static final double EPS = 1e-6;

    static FastIO io = new FastIO();

    static Point2D readPoint() {
        int x = io.nextInt();
        int y = io.nextInt();
        return new Point2D(x, y);
    }

    static Point2D getLineIntersection(Point2D p, Point2D v, Point2D q, Point2D w) {
        if (Math.abs(v.crossProduct(w).getZ()) < EPS) {
            return null;
        }
        double t = w.crossProduct(p.subtract(q)).getZ() / v.crossProduct(w).getZ();
        return p.add(v.multiply(t));
    }

    static Point2D nornalVec(Point2D a) {
        return new Point2D(-a.getY(), a.getX());
    }

    static String calc(Point2D a, Point2D b, Point2D c) {
        Point2D center = getLineIntersection(a.add(b).multiply(0.5), nornalVec(b.subtract(a)), b.add(c).multiply(0.5), nornalVec(c.subtract(b)));
        if (center == null) {
            return "NO";
        }
        if (Math.abs(a.distance(b)- b.distance(c)) < EPS) {
            return "YES";
        }
        return "NO";
    }

    public static void main(String[] args) {
        Point2D a = readPoint();
        Point2D b = readPoint();
        Point2D c = readPoint();

        io.println(calc(a, b, c));

        io.flush();
        io.close();
    }

    public static class FastIO extends PrintWriter {
        private BufferedReader bufferedReader;
        private StringTokenizer stringTokenizer;

        public FastIO() {
            this(System.in, System.out);
        }

        public FastIO(InputStream inputStream, OutputStream outputStream) {
            super(new BufferedOutputStream(outputStream));
            bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
            stringTokenizer = new StringTokenizer("");
        }

        public String next() {
            while (!stringTokenizer.hasMoreTokens()) {
                try {
                    stringTokenizer = new StringTokenizer(bufferedReader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return stringTokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        long ax = in.nextLong();
        long ay = in.nextLong();
        long bx = in.nextLong();
        long by = in.nextLong();
        long cx = in.nextLong();
        long cy = in.nextLong();
        if (ax == bx && ax == cx && ay == by && ay == cy) {
            System.out.println("Yes");
            return;
        }
        long r1 = (ax - bx) * (ax - bx);
        r1 += (ay - by) * (ay - by);
        long r2 = (bx - cx) * (bx - cx);
        r2 += (by - cy) * (by - cy);
        double k1 = (by - ay);
        k1 /= (bx - ax);
        double k2 = (cy - by);
        k2 /= (cx - bx);
        if (ax == bx && ay == by) {
            System.out.println("No");
            return;
        }
        if (bx == cx && by == cy) {
            System.out.println("No");
            return;
        }
        if (ax == cx && ay == cy) {
            System.out.println("Yes");
            return;
        }
        if (r1 == r2) {
            System.out.println("Yes");
            return;
        }
        if (Math.abs(k1) == Math.abs(k2)) {
            System.out.println("No");
            return;
        }
        System.out.println("No");
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        long ax = in.nextLong();
        long ay = in.nextLong();
        long bx = in.nextLong();
        long by = in.nextLong();
        long cx = in.nextLong();
        long cy = in.nextLong();
        if (ax == bx && ax == cx && ay == by && ay == cy) {
            System.out.println("Yes");
            return;
        }
        long r1 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
        long r2 = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
        double k1 = (by - ay);
        k1 /= (bx - ax);
        double k2 = (cy - by);
        k2 /= (cx - bx);
        if (ax == bx && ay == by) {
            System.out.println("No");
            return;
        }
        if (bx == cx && by == cy) {
            System.out.println("No");
            return;
        }
        if (ax == cx && ay == cy) {
            System.out.println("Yes");
            return;
        }
        if (Math.abs(k1) == Math.abs(k2)) {
            System.out.println("No");
            return;
        }
        if (r1 == r2) {
            System.out.println("Yes");
            return;
        }
        else {
            System.out.println("No");
            return;
        }
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.util.*;
public class Main
{
    public static void main(String [] args)
    {
        Scanner in=new Scanner(System.in);
	int ax,ay,bx,by,cx,cy;
	ax=in.nextInt();
	ay=in.nextInt();
	bx=in.nextInt();
	by=in.nextInt();
	cx=in.nextInt();
	cy=in.nextInt();
	int ab=(bx-ax)*(bx-ax)+(by-ay)*(by-ay);
	int bc=(bx-cx)*(bx-cx)+(by-cy)*(by-cy);
	if((bx-ax)*(by-cy)!=(bx-cx)*(by-ay)&&ab==bc)
		System.out.print("YES");
	else
		System.out.print("NO");
    }
}

import java.io.*;
import java.util.*;

public class Ques2 {

    static class Scan {

        private final InputStream inputStream;
        private final byte[] buffer = new byte[1024];
        private int currentChar;
        private int numChars;
        private SpaceCharFilter filter;

        public Scan() {
            inputStream = System.in;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (currentChar >= numChars) {
                currentChar = 0;
                try {
                    numChars = inputStream.read(buffer);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buffer[currentChar++];
        }

        public String nextLine() {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String str = "";

            try {
                str = br.readLine();
            }
            catch (IOException e) {
            }
            return str;
        }

        public int nextInt() {
            int ch = read();

            while(isSpaceChar(ch))
                ch = read();

            int sgn = 1;

            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            int res = 0;
            do {
                if(ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res * sgn;
        }

        public long nextLong() {
            int ch = read();

            while (isSpaceChar(ch))
                ch = read();

            int sgn = 1;

            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            long res = 0;

            do {
                if (ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res * sgn;
        }

        public double nextDouble() {
            int ch = read();

            while (isSpaceChar(ch))
                ch = read();

            int sgn = 1;
            if (ch == '-') {
                sgn = -1;
                ch = read();
            }

            double res = 0;
            while (!isSpaceChar(ch) && ch != '.') {
                if (ch == 'e' || ch == 'E')
                    return res * Math.pow(10, nextInt());
                if (ch < '0' || ch > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += ch - '0';
                ch = read();
            }
            if (ch == '.') {
                ch = read();
                double m = 1;
                while (!isSpaceChar(ch)) {
                    if (ch == 'e' || ch == 'E')
                        return res * Math.pow(10, nextInt());
                    if (ch < '0' || ch > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (ch - '0') * m;
                    ch = read();
                }
            }

            return res * sgn;
        }

        public String readString() {
            int ch = read();
            while (isSpaceChar(ch))
                ch = read();

            StringBuilder res = new StringBuilder();

            do {
                res.appendCodePoint(ch);
                ch = read();
            }
            while (!isSpaceChar(ch));

            return res.toString();
        }

        public boolean isSpaceChar(int ch) {
            if (filter != null)
                return filter.isSpaceChar(ch);
            return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t' || ch == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static class Print {
        private final BufferedWriter bw;

        public Print() {
            this.bw=new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void print(Object object)throws IOException {
            bw.append(""+object);
        }

        public void println(Object object)throws IOException {
            print(object);
            bw.append("\n");
        }

        public void close()throws IOException {
            bw.close();
        }
    }

    public static void main(String args[]) throws IOException {
        Scan sc = new Scan();
        Print pr = new Print();

        long ax, ay, bx, by, cx, cy;
        ax=sc.nextInt();
        ay=sc.nextInt();
        bx=sc.nextInt();
        by=sc.nextInt();
        cx=sc.nextInt();
        cy=sc.nextInt();

        double ab, bc, ac;

        ab = Math.sqrt((ax-bx)*(ax-bx) + (ay-by)*(ay-by));
        bc = Math.sqrt((bx-cx)*(bx-cx) + (by-cy)*(by-cy));
        ac = Math.sqrt((ax-cx)*(ax-cx) + (ay-cy)*(ay-cy));

        double arr[] = new double[3];
        arr[0]=ab;
        arr[1]=bc;
        arr[2]=ac;

        Arrays.sort(arr);

        if(arr[0]+arr[1]==arr[2])
            pr.println("No");
        else if(ab==bc)
            pr.println("Yes");
        else
            pr.println("No");

        pr.close();

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int[] A = new int[]{in.nextInt(), in.nextInt()};
            int[] B = new int[]{in.nextInt(), in.nextInt()};
            int[] C = new int[]{in.nextInt(), in.nextInt()};

            if (!collinear(A, B, C) && dist(A, B) == dist(B, C)) {
                out.println("Yes");
            } else {
                out.println("No");
            }
        }

        private boolean collinear(int[] a, int[] b, int[] c) {
            //rownanie prostej : (y-y1)(x2-x1) - (y2-y1)(x-x1)==0
            return (c[1] - a[1]) * (b[0] - a[0]) - (b[1] - a[1]) * (c[0] - a[0]) == 0;
        }

        private long dist(int[] a, int[] b) {
            long dx = a[0] - b[0];
            long dy = a[1] - b[1];
            return dx * dx + dy * dy;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;

public class Main {
	//////
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	//////

	public static float dist(int x1,int y1,int x2,int y2){
		return (float)Math.pow((Math.pow(Math.abs(x2-x1),2)+Math.pow(Math.abs(y2-y1),2)),0.5);
	}
	public static void main(String[] args) throws IOException {

		FastReader scan = new FastReader();

		int x1=scan.nextInt();
		int y1=scan.nextInt();
		int x2=scan.nextInt();
		int y2=scan.nextInt();
		int x3=scan.nextInt();
		int y3=scan.nextInt();

		//System.out.println(dist(x1,y1,x3,y3));
		//System.out.println(dist(x1,y1,x2,y2));
		//System.out.println(dist(x2,y2,x3,y3));

		if(dist(x1,y1,x3,y3)==dist(x1,y1,x2,y2)+dist(x2,y2,x3,y3)){
			System.out.println("NO");return;
		}

		if(dist(x1,y1,x2,y2)==dist(x2,y2,x3,y3)){
			System.out.println("YES");
		}else
			System.out.println("NO");

	}

}

import java.util.Scanner;
public class p845c {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ax = sc.nextInt();
		int ay = sc.nextInt();
		int bx = sc.nextInt();
		int by = sc.nextInt();
		int cx = sc.nextInt();
		int cy = sc.nextInt();

		boolean ans = (by - ay)*(cx-bx) != (cy-by)*(bx-ax);

		if (ans && ( sq(ax - bx) + sq (ay - by) ) == ( sq (bx - cx) + sq (by - cy) ))
			System.out.println("Yes");
		else
			System.out.println("No");

	}

	public static int sq(int a) { return a*a;}

}

import java.util.*;
import java.io.*;

public final class Main {

    public static void main(String[] args) throws Exception {
        PrintWriter pw = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());

        long ax = Long.parseLong(st.nextToken());
        long ay = Long.parseLong(st.nextToken());
        long bx = Long.parseLong(st.nextToken());
        long by = Long.parseLong(st.nextToken());
        long cx = Long.parseLong(st.nextToken());
        long cy = Long.parseLong(st.nextToken());

        if(ax == bx && bx == cx || ay == by && by == cy){
            System.out.println("No");
            return;
        }

        if((Math.pow(Math.abs(ax-bx) ,2) + Math.pow(Math.abs(ay-by), 2)) !=
                (Math.pow(Math.abs(cx-bx) ,2) + Math.pow(Math.abs(cy-by), 2))){
            System.out.println("No");
            return;
        }
        //distance from a to b must be same as b to c but they cannot all lie on the same plane
        //ie the slope from a to b and b to c cannot be equal
        if((ax-bx) == 0 && (bx-cx) == 0){
            System.out.println("No");
            return;
        }else if((ax-bx) == 0 || (bx-cx) == 0){
            System.out.println("Yes");
            return;
        }
        double aToBSlope = (ay-by)/(ax-bx);
        double bToCSlope = (by-cy)/(bx-cx);

        pw.println(aToBSlope == bToCSlope ? "No" : "Yes");
        pw.close();
    }
}

import java.awt.Point;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.util.Scanner;

public class B851GeometryTest {

	public static class mPoint {
		public double x, y;
		public mPoint(double a, double b) {
			x = a;
			y = b;
		}
		public double dis(mPoint p) {
			return Math.sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y));
		}
	}

	public static class Line {
		public mPoint a, b;
		public Line(mPoint a, mPoint b) {
			this.a = a;
			this.b = b;
		}

		public boolean isVert() {
			return b.x - a.x == 0;
		}

		public double slope() throws Exception {
			if (isVert()) {
				throw new Exception("Undefined");
			}
			return (b.y - a.y) / (b.x - a.x);
		}

		public boolean intersects(Line l) throws Exception {
			if (isVert() && l.isVert()) {
				return false;
			} else if (isVert()) {
				return true;
			} else if (l.isVert()) {
				return true;
			} else {
				return slope() != l.slope();
			}
		}

		public mPoint pGx(double x) throws Exception {
			return new mPoint(x, slope() * x + a.y - slope()*a.x);
		}

//		public mPoint pGy(double y) throws Exception {
//			return new mPoint((y - a.y + slope()*a.x) / slope(), y);
//		}

		public mPoint intersect(Line l) throws Exception {
			if (isVert()) {
				return l.pGx(a.x);
			} else if (l.isVert()) {
				return pGx(l.a.x);
			} else {
				double b1 = a.y - slope() * a.x;
				double b2 = l.a.y - l.slope() * l.a.x;
				return new mPoint((b2 * slope() - b1 * l.slope()) / (slope() - l.slope()), (b2 - b1) / (slope() - l.slope()));
			}
		}

		public Line bisection() throws Exception {
			if (isVert()) {
				return new Line(new mPoint(a.x, (a.y + b.y)/2), new mPoint(a.x + 1, (a.y + b.y)/2));
			} else if (slope() == 0) {
				return new Line(new mPoint((a.x + b.x) / 2, a.y), new mPoint((a.x + b.x) / 2, a.y + 1));
			}
			double slope = -1 * Math.pow(slope(), -1);
			return new Line(new mPoint((a.x + b.x) / 2, (a.y + b.y) / 2),
							new mPoint((a.x + b.x) / 2 + 1,
							slope * ((a.x + b.x) / 2 + 1) + ((a.y + b.y) / 2) - (slope * ((a.x + b.x) / 2))));
		}

	}

	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		mPoint a = new mPoint(in.nextInt(), in.nextInt());
		mPoint b = new mPoint(in.nextInt(), in.nextInt());
		mPoint c = new mPoint(in.nextInt(), in.nextInt());

		Line ab = (new Line(a, b)).bisection();
		Line bc = (new Line(b, c)).bisection();

		if (!ab.intersects(bc)) {
			System.out.println("No");
		} else {
			mPoint d = ab.intersect(bc);
			if (d.dis(a) != d.dis(c)) {
				System.out.println("No");
			} else if (a.dis(b) != b.dis(c)) {
				System.out.println("No");
			} else {
				System.out.println("Yes");
			}
		}

	}

}

import java.util.*;
import java.text.*;

import javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener;

import java.io.*;
import java.math.*;
public class code5 {
	InputStream is;
	PrintWriter out;
	static long mod=pow(10,9)+7;
	static int dx[]={0,0,1,-1},dy[]={1,-1,0,0};
	void solve() throws Exception
	{
		int ax=ni();
		int ay=ni();
		int bx=ni();
		int by=ni();
		int cx=ni();
		int cy=ni();
		double distab=Math.sqrt(pow((ax-bx),2)+pow((ay-by),2));
		double distbc=Math.sqrt(pow((cx-bx),2)+pow((cy-by),2));
		double distca=Math.sqrt(pow((ax-cx),2)+pow((ay-cy),2));
		//System.out.println(distab+" "+distbc+" "+distca);
		if(distab+distbc==distca||distab+distca==distbc||distca+distbc==distab)
			out.println("No");
		else {

			//System.out.println(distab+" "+distbc);
			if(distab==distbc)
				out.println("Yes");
			else
				out.println("No");
		}
	}
	double sqrt(long num1)
	{
		double ans=-1,low=0,high=num1,num=num1;
		while(high-low>1e-9)
		{
			double mid=(low+high)/2;
			double val=num/mid;
			if(mid<=val)
			{
				ans=mid;
				low=mid+1e-9;
			}else
				high=mid-1e-9;
		}
		return ans;

	}
	public static int count(int x)
	{
		int num=0;
		while(x!=0)
		{
			x=x&(x-1);
			num++;
		}
		return num;
	}
	static long d, x, y;
	void extendedEuclid(long A, long B) {
	    if(B == 0) {
	        d = A;
	        x = 1;
	        y = 0;
	    }
	    else {
	        extendedEuclid(B, A%B);
	        long temp = x;
	        x = y;
	        y = temp - (A/B)*y;
	    }
	}
	long modInverse(long A,long M) //A and M are coprime
	{
	    extendedEuclid(A,M);
	    return (x%M+M)%M;    //x may be negative
	}
	public static void mergeSort(int[] arr, int l ,int r){
		if((r-l)>=1){
			int mid = (l+r)/2;
			mergeSort(arr,l,mid);
			mergeSort(arr,mid+1,r);
			merge(arr,l,r,mid);
		}
	}
	public static void merge(int arr[], int l, int r, int mid){
		int n1 = (mid-l+1), n2 = (r-mid);
		int left[] = new int[n1];
		int right[] = new int[n2];
		for(int i =0 ;i<n1;i++) left[i] = arr[l+i];
		for(int i =0 ;i<n2;i++) right[i] = arr[mid+1+i];
		int i =0, j =0, k = l;
		while(i<n1 && j<n2){
			if(left[i]>right[j]){
				arr[k++] = right[j++];
			}
			else{
				arr[k++] = left[i++];
			}
		}
		while(i<n1) arr[k++] = left[i++];
		while(j<n2) arr[k++] = right[j++];
	}
	public static void mergeSort(long[] arr, int l ,int r){
		if((r-l)>=1){
			int mid = (l+r)/2;
			mergeSort(arr,l,mid);
			mergeSort(arr,mid+1,r);
			merge(arr,l,r,mid);
		}
	}
	public static void merge(long arr[], int l, int r, int mid){
		int n1 = (mid-l+1), n2 = (r-mid);
		long left[] = new long[n1];
		long right[] = new long[n2];
		for(int i =0 ;i<n1;i++) left[i] = arr[l+i];
		for(int i =0 ;i<n2;i++) right[i] = arr[mid+1+i];
		int i =0, j =0, k = l;
		while(i<n1 && j<n2){
			if(left[i]>right[j]){
				arr[k++] = right[j++];
			}
			else{
				arr[k++] = left[i++];
			}
		}
		while(i<n1) arr[k++] = left[i++];
		while(j<n2) arr[k++] = right[j++];
	}
	 static class Pair implements Comparable<Pair>{

	       int x;long y,k;
	       int i,dir;
	       long cost;
		Pair (int x,long y){
			this.x=x;
			this.y=y;
		}
		public int compareTo(Pair o) {
				return this.i-o.i;
		}

		public String toString(){
			return x+" "+y+" "+k+" "+i;}
		public boolean equals(Object o) {
			if (o instanceof Pair) {
				Pair p = (Pair)o;
				return p.x == x && p.y == y ;
			}
			return false;
		}
		public int hashCode() {
			return new Long(x).hashCode()*31 + new Long(y).hashCode();
		}
	}

	    public static boolean isPal(String s){
	        for(int i=0, j=s.length()-1;i<=j;i++,j--){
	                if(s.charAt(i)!=s.charAt(j)) return false;
	        }
	        return true;
	    }
	    public static String rev(String s){
			StringBuilder sb=new StringBuilder(s);
			sb.reverse();
			return sb.toString();
	    }

	    public static long gcd(long x,long y){
		if(y==0)
			return x;
		else
			return gcd(y,x%y);
	    }

	    public static int gcd(int x,int y){
	    	if(y==0)
	    		return x;
	    	return gcd(y,x%y);
	    }

	    public static long gcdExtended(long a,long b,long[] x){

	        if(a==0){
	            x[0]=0;
	            x[1]=1;
	            return b;
	        }
	        long[] y=new long[2];
	        long gcd=gcdExtended(b%a, a, y);

	        x[0]=y[1]-(b/a)*y[0];
	        x[1]=y[0];

	        return gcd;
	    }

	    public static int abs(int a,int b){
		return (int)Math.abs(a-b);
	    }

	    public static long abs(long a,long b){
		return (long)Math.abs(a-b);
	    }

	    public static int max(int a,int b){
		if(a>b)
			return a;
		else
			return b;
	    }

	    public static int min(int a,int b){
		if(a>b)
			return b;
		else
			return a;
	    }

	    public static long max(long a,long b){
		if(a>b)
			return a;
		else
			return b;
	    }

	    public static long min(long a,long b){
		if(a>b)
			return b;
		else
			return a;
	    }

	    public static long pow(long n,long p,long m){
		 long  result = 1;
		  if(p==0)
		    return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    if(result>=m)
		    result%=m;
		    p >>=1;
		    n*=n;
		    if(n>=m)
		    n%=m;
		}
		return result;
	    }

	    public static long pow(long n,long p){
		long  result = 1;
		  if(p==0)
		    return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    p >>=1;
		    n*=n;
		}
		return result;
	    }
	    public static void debug(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
	    void run() throws Exception {
			is = System.in;
			out = new PrintWriter(System.out);
			solve();
			out.flush();
		}

	    public static void main(String[] args) throws Exception {
			new Thread(null, new Runnable() {
				public void run() {
					try {
						new code5().run();
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}, "1", 1 << 26).start();

	    	//new code5().run();
		}
	    private byte[] inbuf = new byte[1024];
		public int lenbuf = 0, ptrbuf = 0;

		private int readByte() {
			if (lenbuf == -1)
				throw new InputMismatchException();
			if (ptrbuf >= lenbuf) {
				ptrbuf = 0;
				try {
					lenbuf = is.read(inbuf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (lenbuf <= 0)
					return -1;
			}
			return inbuf[ptrbuf++];
		}

		private boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}

		private int skip() {
			int b;
			while ((b = readByte()) != -1 && isSpaceChar(b));
			return b;
		}

		private double nd() {
			return Double.parseDouble(ns());
		}

		private char nc() {
			return (char) skip();
		}

		private String ns() {
			int b = skip();
			StringBuilder sb = new StringBuilder();
			while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}

		private char[] ns(int n) {
			char[] buf = new char[n];
			int b = skip(), p = 0;
			while (p < n && !(isSpaceChar(b))) {
				buf[p++] = (char) b;
				b = readByte();
			}
			return n == p ? buf : Arrays.copyOf(buf, p);
		}

		private char[][] nm(int n, int m) {
			char[][] map = new char[n][];
			for (int i = 0; i < n; i++)
				map[i] = ns(m);
			return map;
		}

		private int[] na(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = ni();
			return a;
		}
		private long[] nl(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nl();
			return a;
		}

		private int ni() {
			int num = 0, b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

		private long nl() {
			long num = 0;
			int b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

}

import java.util.*;
import java.io.*;

public class A  {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

		int ax = sc.nextInt(),
			ay = sc.nextInt(),
			bx = sc.nextInt(),
			by = sc.nextInt(),
			cx = sc.nextInt(),
			cy = sc.nextInt();

		if ((ax - bx) * (by - cy) == (bx - cx) * (ay - by)) {
			out.println("NO");
		} else if (d(ax, ay, bx, by) != d(bx, by, cx, cy) &&
				d(ax, ay, cx, cy) != d(bx, by, cx, cy) &&
				d(ax, ay, bx, by) != d(ax, ay, cx, cy)) {
			out.println("NO");
		} else {
			out.println("YES");
		}

		sc.close();
		out.close();
	}

	public static int d(int ax, int ay, int bx, int by) {
		return (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn Agrawal coderbond007  PLEASE!! PLEASE!! HACK MY SOLUTION!!
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            double[] x = new double[3];
            double[] y = new double[3];
            in.nextDoubleArrays(x, y);
            boolean collinear = Double.compare((y[2] - y[0]) * (x[1] - x[0]), ((y[1] - y[0]) * (x[2] - x[0]))) == 0;
            double dist1 = (x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]);
            double dist2 = (x[1] - x[2]) * (x[1] - x[2]) + (y[1] - y[2]) * (y[1] - y[2]);
            boolean unequal = Double.compare(dist1, dist2) != 0;
            out.println(unequal || collinear ? "No" : "Yes");
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        private static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public double nextDouble() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            }
            if (c == '.') {
                c = pread();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, nextInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = pread();
                }
            }
            return res * sgn;
        }

        public void nextDoubleArrays(double[]... arrays) {
            for (int i = 0; i < arrays[0].length; i++) {
                for (int j = 0; j < arrays.length; j++) {
                    arrays[j][i] = nextDouble();
                }
            }
        }

        private interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.util.Scanner;

public class angle {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x1 = in.nextInt();
		int y1 = in.nextInt();
		int x2 = in.nextInt();
		int y2 = in.nextInt();
		int x3 = in.nextInt();
		int y3 = in.nextInt();
		double d1 = Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
		double d2 = Math.sqrt((x2-x3)*(x2-x3) + (y2-y3)*(y2-y3));
		if(d1 == d2)
	 	{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
		in.close();
	}

}

import java.util.Collections;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Arrays;

public class Main {
  public static Scanner scanner = new Scanner(System.in);

  public static double distance(int ax, int ay, int bx, int by) {
	return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay,2));
  }

  public static double slope(int ax, int ay, int bx, int by) {
    double top = by - ay;
    double down = bx - ax;
    return top/down;
  }

  public static void main(String[] args) {

    int ax, ay, bx, by, cx, cy;
    while(scanner.hasNext()) {
      ax = scanner.nextInt();
      ay = scanner.nextInt();
      bx = scanner.nextInt();
      by = scanner.nextInt();
      cx = scanner.nextInt();
      cy = scanner.nextInt();
     if(distance(ax, ay, bx, by) == distance(bx, by, cx, cy))
     {
       if(slope(ax, ay, bx, by) == slope(bx, by, cx, cy)) System.out.println("NO");
       else System.out.println("YES");
     } else System.out.println("NO");
    }
  }
}

///package CodeForce;

import java.util.*;
import java.io.*;
public class Round432B {
	 static LinkedHashMap<Long,Long> memo;
	public static void main(String[] ard)  throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw=new PrintWriter(System.out);
		String[] s=br.readLine().trim().split("\\s++");
		int x1=Integer.valueOf(s[0]);
		int y1=Integer.valueOf(s[1]);
		int x2=Integer.valueOf(s[2]);
		int y2=Integer.valueOf(s[3]);
		int x3=Integer.valueOf(s[4]);
		int y3=Integer.valueOf(s[5]);
		long d1=((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		long d2=((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
		double m1=Math.atan2(y2-y1, x2-x1);
		double m2=Math.atan2(y3-y2, x3-x2);
      if(d1!=d2)pw.println("No");
      else if(m1==m2) pw.println("No");
      else pw.println("Yes");
    	 /* long mx1=x2-x1;
    	  long my1=y2-y1;
    	  long mx2=x3-x2;
    	  long my2=y3-y2;
    	  if(mx1==mx2&&my1==my2)pw.println("No");
    	  else pw.println("Yes");*/

	pw.close();

	}
	 private static boolean collinear(int x1, int y1, int x2, int y2, int x3, int y3) {
	      return (x1 * 1L * (y2 - y3) + x2 * 1L * (y3 - y1) + x3 * 1L * (y1 - y2)) == 0 ? true : false;
	  }
	public static boolean palin(int[] A)
	{
		int i=0;
		int j=A.length-1;
		while(i!=j)
		{
			if(A[i]!=A[j])return false;
			i++;
			j--;
		}
	   return true;
	}
	/*public static boolean[] Seive()
	{

		 b=new boolean[10000001];
		Arrays.fill(b, true);
		b[0]=false;
		b[1]=false;

		for(int i=2;i<=Math.sqrt(10000000);i++)
		{
			if(b[i])
			{

			 for(int j=i*2;j<=10000000;j+=i)
				{
					     b[j]=false;

				}
			}

		}
		return b;
	}*/
	public long grundy(long a) {
        if (a <= 2) return a;
        boolean[] tmpArr = new boolean[35];
        Long tmp = memo.get(a);
        if (tmp != null) return tmp;
        for (int j = 0; j < 35; j++) {
            if (a < (1L << j)) break;
            long next = ((1L << j) - 1) & a;
            next |= a >>> (j + 1);
            tmpArr[(int) grundy(next)] = true;
        }
        for (int j = 0; j < 35; j++) {
            if (!tmpArr[j]) {
                memo.put(a, (long) j);
                return j;
            }
        }
        return 0;
    }

public class PrimeRoutines {

		int[] lowDivIdx;
		int[] lowDiv;
		int[] p;
		int N;

		public PrimeRoutines(int N) {
			this.N = N;
			p = new int[(int)(N / Math.log(N))];
			lowDivIdx = new int[N + 1];
			lowDiv = new int[N + 1];
			Arrays.fill(lowDivIdx, -1);
			int pCnt = 0;
			for (int i = 2; i <= N; i++) {
				if (lowDivIdx[i] == -1) {
					if (p.length == pCnt) {
						p = Arrays.copyOf(p, 2 * p.length);
					}
					lowDivIdx[i] = pCnt;
					lowDiv[i] = i;
					p[pCnt++] = i;
				}
				int toJ = Math.min(pCnt, lowDivIdx[i] + 1);
				for (int j = 0; j < toJ; j++) {
					int x = i * p[j];
					if (x > N) {
						break;
					}
					lowDivIdx[x] = j;
					lowDiv[x] = p[j];
				}
			}
			p = Arrays.copyOf(p, pCnt);
		}

		int[] divCount() {
			int[] ret = new int[N + 1];
			int[] tmp = new int[N + 1];
			ret[1] = 1;
			for (int i = 2; i <= N; i++) {
				int p = lowDiv[i];
				int j = i / p;
				if (p == lowDiv[j]) {
					int k = tmp[j];
					ret[i] = ret[j] / k * (k + 1);
					tmp[i] = k + 1;
				} else {
					ret[i] = ret[j] * 2;
					tmp[i] = 2;
				}
			}
			return ret;
		}

		List<Integer> getDivsNotSorted(int x) {
			List<Integer> ret = new ArrayList<Integer>(0);
			ret.add(1);
			while (x > 1) {
				int sz = ret.size();
				int pr = lowDiv[x];
				while (lowDiv[x] == pr) {
					int to = ret.size();
					for (int i = ret.size() - sz; i < to; i++) {
						ret.add(ret.get(i) * pr);
					}
					x /= pr;
				}
			}
			return ret;
		}

		int[] moebiusFunction() {
			int[] mu = new int[N + 1];
			mu[1] = 1;
			for (int i = 2; i <= N; i++) {
				int p = lowDiv[i];
				int j = i / p;
				if (p != lowDiv[j]) {
					mu[i] = -mu[j];
				}
			}
			return mu;
		}

		int[] eulerFunction() {
			int[] phi = new int[N + 1];
			phi[1] = 1;
			for (int i = 2; i <= N; i++) {
				int p = lowDiv[i];
				int j = i / p;
				phi[i] = phi[j] * (p != lowDiv[j] ? p - 1 : p);
			}
			return phi;
		}
	}

	public static class Merge {
		public void sort(int inputArr[]) {
	        int length = inputArr.length;
	        doMergeSort(inputArr,0, length - 1);
	    }
	    private void doMergeSort(int[] arr,int lowerIndex, int higherIndex) {
	        if (lowerIndex < higherIndex) {
	            int middle = lowerIndex + (higherIndex - lowerIndex) / 2;
	            doMergeSort(arr,lowerIndex, middle);
	            doMergeSort(arr,middle + 1, higherIndex);
	            mergeParts(arr,lowerIndex, middle, higherIndex);
	        }
	    }
	    private void mergeParts(int[]array,int lowerIndex, int middle, int higherIndex) {
	    	int[] temp=new int[higherIndex-lowerIndex+1];
	        for (int i = lowerIndex; i <= higherIndex; i++) {
	            temp[i-lowerIndex] = array[i];
	        }
	        int i = lowerIndex;
	        int j = middle + 1;
	        int k = lowerIndex;
	        while (i <= middle && j <= higherIndex) {
	            if (temp[i-lowerIndex] < temp[j-lowerIndex]) {
	                array[k] = temp[i-lowerIndex];
	                i++;
	            } else {
	                array[k] = temp[j-lowerIndex];
	                j++;
	                //cnt+=(middle+1-i);
	            }
	            k++;
	        }
	        while (i <= middle) {
	            array[k] = temp[i-lowerIndex];
	            k++;
	            i++;
	        }
	        while(j<=higherIndex){
	        	array[k]=temp[j-lowerIndex];
	        	k++;
	        	j++;
	        }
	        /*pw.println(lowerIndex+" "+higherIndex);
	        for(int m=lowerIndex;m<=higherIndex;m++)
	        	pw.print(array[m]+" ");
	        pw.println();*/
	    }
	}
		private static class DSU{
			int[] parent;
			int[] rank;
			int cnt;
			public DSU(int n){
				parent=new int[n];
				rank=new int[n];
				for(int i=0;i<n;i++){
					parent[i]=i;
					rank[i]=1;
				}
				cnt=n;
			}
			int find(int i){
		        while(parent[i] !=i){
		        	parent[i]=parent[parent[i]];
		        	i=parent[i];
		        }
		        return i;
		    }
			int Union(int x, int y){
		        int xset = find(x);
		        int yset = find(y);
		        if(xset!=yset)
		        	cnt--;
		        if(rank[xset]<rank[yset]){
		        	parent[xset] = yset;
			        rank[yset]+=rank[xset];
			        rank[xset]=0;
			        return yset;
		        }else{
		        	parent[yset]=xset;
		        	rank[xset]+=rank[yset];
		        	rank[yset]=0;
		        	return xset;
		        }
		    }
		}
		static void multiply(long[][] a, long[][] b,long m){
			int n=a.length;
		    long[][] mul=new long[n][n];
		    for (int i = 0; i < n; i++){
		        for (int j = 0; j < n; j++){
		            mul[i][j] = 0;
		            for (int k = 0; k < n; k++)
		                mul[i][j] = (mul[i][j]+(a[i][k]*b[k][j])%m)%m;
		        }
		    }
		    for (int i=0; i<n; i++)
		        for (int j=0; j<n; j++)
		            a[i][j] =mul[i][j];
		}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;

public class B {
	public static void main(String[] args) throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		FastScanner in = new FastScanner(System.in);

		int [] a= new int[2];
		int [] b= new int[2];
		int [] c= new int[2];
		for (int i = 0; i < 2; i++) {
			a[i]= in.nextInt();
		}
		for (int i = 0; i < 2; i++) {
			b[i]= in.nextInt();
		}
		for (int i = 0; i < 2; i++) {
			c[i]= in.nextInt();
		}

		long d1= dist(a[0],a[1], b[0], b[1]);
		long d2= dist(c[0],c[1], b[0], b[1]);

		if(d1==d2&&cross(a,b,c)!=0){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}

	}
	public static long dist(int x1, int y1, int x2, int y2){
		long xx= (x2-x1)*(x2-x1);
		long yy= (y2-y1)*(y2-y1);
		return xx+yy;
	}
	public static int cross(int[] A, int[] B, int[] C){
        int [] AB = new int[2];
        int [] AC = new int[2];
        AB[0] = B[0]-A[0];
        AB[1] = B[1]-A[1];
        AC[0] = C[0]-A[0];
        AC[1] = C[1]-A[1];
        int cross = AB[0] * AC[1] - AB[1] * AC[0];
        return cross;
    }

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

		public String next() throws IOException {
			if (!st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
				return next();
			}
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;

public class B {
	public static void main(String[] args) throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		FastScanner in = new FastScanner(System.in);

		int ax= in.nextInt();
		int ay= in.nextInt();
		int bx= in.nextInt();
		int by= in.nextInt();
		int cx= in.nextInt();
		int cy= in.nextInt();

		int slope1n= by-ay;
		int slope2n= cy-by;
		//int slope3n= cy-ay;
		int slope1d= bx-ax;
		int slope2d= cx-bx;
		//int slope3d= cx-ax;

		int g1= gcd(Math.abs(slope1n), Math.abs(slope1d));
		int g2= gcd(Math.abs(slope2n), Math.abs(slope2d));
		//int g3= gcd(Math.abs(slope3n), Math.abs(slope3d));
		slope1n/= g1;
		slope1d/= g1;
		slope2n/= g2;
		slope2d/= g2;
		if(slope1n<0&&slope1d<0){
			slope1n*=-1;
			slope1d*=-1;
		}
		else if(slope1n>0&&slope1d<0){
			slope1n*=-1;
			slope1d*=-1;
		}

		if(slope2n<0&&slope2d<0){
			slope2n*=-1;
			slope2d*=-1;
		}
		else if(slope2n>0&&slope2d<0){
			slope2n*=-1;
			slope2d*=-1;
		}
		if(slope1n==slope2n&&slope1d==slope2d){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}

	}
	public static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

		public String next() throws IOException {
			if (!st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
				return next();
			}
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
}

import java.util.*;
import java.lang.*;
import java.io.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.x=x;
            this.y=y;
        }
    }
    static double sqrt(long num){
        int c1=0,c2=0;
        double a=(double)num;
        double ans=0;
        long start=0,end=(long)a;
        while(start<=end){
            c1++;
            long mid=(start+end)/2;
            if((mid*mid)==(long)a){
                ans=mid;
                break;
            }
            else if((mid*mid)<a){
                start=mid+1;
                ans=(double)mid;
            }
            else{
                end=mid-1;
            }
        }
        double res=ans;
        double res1=0;
        while(res1!=res){
            c2++;
            res1=res;
            res=(res+(a/res))/2;
        }
        return res;
    }
    static double dist(long a,long b,long c,long d){
        double ans=sqrt((a-c)*(a-c)+(b-d)*(b-d));
        return ans;
    }
    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        long a=sc.ni(),b=sc.ni(),c=sc.ni(),d=sc.ni(),e=sc.ni(),f=sc.ni();
        long r=a*(d-f)-c*(b-f)+e*(b-d);
        double ab=dist(a,b,c,d);
        double bc=dist(c,d,e,f);
        w.println(r!=0&&ab==bc?"YES":"NO");
        w.close();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            Point a = new Point(in.nextInt(), in.nextInt());
            Point b = new Point(in.nextInt(), in.nextInt());
            Point c = new Point(in.nextInt(), in.nextInt());
            if (a.distance(b) == b.distance(c) && (a.distance(c) != a.distance(b) + b.distance(c))) out.print("Yes");
            else out.print("No");
        }

        class Point {
            double x;
            double y;

            Point() {
            }

            Point(double x, double y) {
                this.x = x;
                this.y = y;
            }

            double distance(Point p) {
                return Math.sqrt(Math.pow(p.x - x, 2) + Math.pow(p.y - y, 2));
            }

            public boolean equals(Object o) {
                if (o == null) return false;
                if (o.getClass() != getClass()) return false;
                Point p = (Point) o;
                return p.x == x && p.y == y;
            }

            public int hashCode() {
                int code = 1;
                code = code * 37 + Double.hashCode(x);
                code = code * 37 + Double.hashCode(y);
                return code;
            }

        }

    }

    static class InputReader {
        private int lenbuf = 0;
        private int ptrbuf = 0;
        private InputStream in;
        private byte[] inbuf = new byte[1024];

        public InputReader(InputStream in) {
            this.in = in;
        }

        private int readByte() {
            if (lenbuf == -1) throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = in.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0) return -1;
            }
            return inbuf[ptrbuf++];
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}

import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    static long distance(int x, int y, int xx, int yy) {
        return (long) (x - xx) * (x - xx) + (y - yy) * (y - yy);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int ax = in.nextInt(), ay = in.nextInt();
        int bx = in.nextInt(), by = in.nextInt();
        int cx = in.nextInt(), cy = in.nextInt();
        if ((long) (ax - bx) == (bx - cx) && (long) (ay - by) == (by - cy)) {
            System.out.println("No");
        } else if (distance(ax, ay, bx, by) == distance(bx, by, cx, cy)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.awt.geom.Point2D;
import java.util.StringTokenizer;
import java.awt.geom.Point2D.Double;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Allen Li
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            Point2D a = new Point2D.Double(in.nextInt(), in.nextInt());
            Point2D b = new Point2D.Double(in.nextInt(), in.nextInt());
            Point2D c = new Point2D.Double(in.nextInt(), in.nextInt());
            double yDa = b.getY() - a.getY();
            double xDa = b.getX() - a.getX();
            double yDb = c.getY() - b.getY();
            double xDb = c.getX() - b.getX();
            double s1 = yDa / xDa;
            double s2 = yDb / xDb;
            if (s1 == s2) {
                out.println("No");
            }
            out.println(a.distance(b) == b.distance(c) ? "Yes" : "No");
//        Point2D center = new Point2D.Double(0, 0);

//        Point2D mid1 = mid(a, b);
//        Point2D mid2 = mid(b, c);
//        if(yDb == 0) {
//            center.setLocation(mid2.getX(), 0);
//            if(xDa == 0) {
//                center.setLocation(center.getX(), mid1.getY());
//            } else {
//                center.setLocation(center.getX(), mid1.getY() + (mid1.getX() - mid2.getX())/s1);
//            }
//        } else if(yDa == 0) {
//            center.setLocation(mid1.getX(), 0);
//            if(xDb == 0) {
//                center.setLocation(center.getX(), mid2.getY());
//            } else {
//                center.setLocation(center.getX(), mid2.getY() + (mid2.getX() - mid1.getX())/s2);
//        }
//        } else if(xDa == 0) {
//            center.setLocation(s2*(mid2.getX() - mid1.getY()) + mid2.getX(), mid1.getY());
//        } else if(xDb == 0) {
//            center.setLocation(s1*(mid1.getX() - mid2.getY()) + mid1.getX(), mid2.getY());
//        } else {
//            center.setLocation((s1*s2*(mid1.getY() - mid2.getY()) - s1 * mid2.getX() + s2 * mid1.getX()) / (s2 - s1), 0);
//            center.setLocation(center.getX(), mid1.getY() - (center.getX() - mid1.getX()) / s1);
//        }
//        if(s1 == s2) {
//            out.println("No");
//            return;
//        }
//        System.out.println(center);
//        double dist = a.distance(center);
//        if(dist != b.distance(center)) {
//            out.println("No");
//            return;
//        }
//        if(dist != c.distance(center)) {
//            out.println("No");
//            return;
//        }
//        if(a.distance(b) != b.distance(c))  {
//            out.println("No");
//            return;
//        }
//        out.println("Yes");
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.util.*;
import java.io.*;
public class Solution{
    static long calcDist(int a,int b,int c,int d){
        return ((c-a)*(c-a)+(d-b)*(d-b));
    }
    public static void main(String[] args){

    Scanner in = new Scanner(System.in);
    int ax = in.nextInt();
    int ay = in.nextInt();
    int bx = in.nextInt();
    int by = in.nextInt();
    int cx = in.nextInt();
    int cy = in.nextInt();
    long distab = calcDist(ax,ay,bx,by);
    long distbc = calcDist(bx,by,cx,cy);
    if(distab==distbc){System.out.println("Yes");}
    else System.out.println("No");

    }
}

import java.util.Scanner;

public class angle {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x1 = in.nextInt();
		int y1 = in.nextInt();
		int x2 = in.nextInt();
		int y2 = in.nextInt();
		int x3 = in.nextInt();
		int y3 = in.nextInt();
		double d1 = Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
		double d2 = Math.sqrt((x2-x3)*(x2-x3) + (y2-y3)*(y2-y3));
		double d3 = Math.sqrt((x3-x1)*(x3-x1) + (y3-y1)*(y3-y1));
		if((d1 == d2 && (d1 + d2 != d3)) || (d3 + d2 == d1))
	 	{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
		in.close();
	}

}

import java.io.BufferedInputStream;
import java.math.BigInteger;
import java.util.*;

public class Main {

	Scanner cin = new Scanner(new BufferedInputStream(System.in));

	BigInteger len(int x1, int y1, int x2, int y2) {
		BigInteger res = BigInteger.ZERO;
		res = res.add(BigInteger.valueOf(y2-y1).multiply(BigInteger.valueOf(y2-y1)));
		res = res.add(BigInteger.valueOf(x2-x1).multiply(BigInteger.valueOf(x2-x1)));
		return res;
	}

	void solve() {
		while (cin.hasNext()) {
			int a0 = cin.nextInt();
			int a1 = cin.nextInt();
			int a2 = cin.nextInt();
			int a3 = cin.nextInt();
			int a4= cin.nextInt();
			int a5 = cin.nextInt();
			BigInteger s1 = BigInteger.valueOf(a5).subtract(BigInteger.valueOf(a3));
			BigInteger s2 = BigInteger.valueOf(a2).subtract(BigInteger.valueOf(a0));
			BigInteger s3 = BigInteger.valueOf(a4).subtract(BigInteger.valueOf(a4));
			BigInteger s4 = BigInteger.valueOf(a3).subtract(BigInteger.valueOf(a1));
			s1 = s1.multiply(s2);
			s3 = s3.multiply(s4);
			if(len(a0,a1,a2,a3).compareTo(len(a2,a3,a4,a5)) == 0 && /*((a5-a3)*(a2-a0)!=(a4-a2)*(a3-a1))*/ s3.compareTo(s4) != 0) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		}
	}

	public static void main(String[] args) {
		new Main().solve();
	}
}

import java.io.*;
import java.util.*;

public class b
{
	public static void main(String[] args)
	{
		FastScanner in = new FastScanner();
		Point points[] = new Point[3];

		for(int i = 0; i < 3; i++)
			points[i] = new Point(in.nextDouble(), in.nextDouble());

		double a1 = points[0].x;
		double b1 = points[1].x;
		double c1 = points[2].x;
		double a2 = points[0].y;
		double b2 = points[1].y;
		double c2 = points[2].y;

		if(c1 == (-a2+b1+b2) && c2 == (a1-b1+b2))
			System.out.println("Yes");
		else if(c1 == (a2+b1-b2) && c2 == (-a1+b1+b2))
			System.out.println("Yes");
		else
			System.out.println("No");

//		double dist1 = points[0].dist(points[1]);
//		double dist2 = points[0].dist(points[2]);
//		double dist3 = points[1].dist(points[2]);

//		System.out.println(c1 + " " + (-a2+b1+b2));
//		System.out.println(c2 + " " + (a1-b1+b2));
//		System.out.println(0.5*(a1-a2+b1+b2));
//		System.out.println(0.5*(a1+a2-b2+b2));
//		System.out.println();
//		System.out.println(c1 + " " + (a2+b1-b2));
//		System.out.println(c2 + " " + (-a1+b1+b2));

//		System.out.println(dist1);
//		System.out.println(dist2);
//		System.out.println(dist3);

//		if(dist1 == dist2 || dist2 == dist3 || dist1 == dist3)
//			System.out.println("Yes");
//		else
//			System.out.println("No");
	}

	public static class Point
	{
		double x, y;

		public Point(double xx, double yy)
		{
			x = xx;
			y = yy;
		}

		public double dist(Point o)
		{
			double dx = x-o.x;
			double dy = y-o.y;
			return Math.sqrt(dx*dx+dy*dy);
		}
	}

	public static class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s)
		{
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner()
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken()
		{
			while (st == null || !st.hasMoreElements())
			{
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt()
		{
			return Integer.parseInt(nextToken());
		}

		long nextLong()
		{
			return Long.parseLong(nextToken());
		}

		double nextDouble()
		{
			return Double.parseDouble(nextToken());
		}

		String next()
		{
			return nextToken();
		}
	}
}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        long ax = in.nextLong();
        long ay = in.nextLong();
        long bx = in.nextLong();
        long by = in.nextLong();
        long cx = in.nextLong();
        long cy = in.nextLong();
        if (ax == bx && ax == cx && ay == by && ay == cy) {
            System.out.println("Yes");
            return;
        }
        long r1 = (ax - bx) * (ax - bx);
        r1 += (ay - by) * (ay - by);
        long r2 = (bx - cx) * (bx - cx);
        r2 += (by - cy) * (by - cy);
        double k1 = (by - ay);
        k1 /= (bx - ax);
        double k2 = (cy - by);
        k2 /= (cx - bx);
        if (ax == bx && ay == by) {
            System.out.println("No");
            return;
        }
        if (bx == cx && by == cy) {
            System.out.println("No");
            return;
        }
        if (ax == cx && ay == cy) {
            System.out.println("Yes");
            return;
        }
        if (Math.abs(k1) == Math.abs(k2)) {
            System.out.println("No");
            return;
        }
        if (r1 == r2) {
            System.out.println("Yes");
            return;
        }
        System.out.println("No");
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.util.*;
import java.io.*;
import java.math.*;
import java.util.regex.*;

public class Main {

    static Scanner input = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    static Reader fastInput = new Reader();

    public static void main(String[] args) throws IOException {
        long ax = input.nextLong();
        long ay = input.nextLong();
        long bx = input.nextLong();
        long by = input.nextLong();
        long cx = input.nextLong();
        long cy = input.nextLong();
        double ab = Math.sqrt(Math.pow(ax - bx, 2) + Math.pow(ay - by, 2));
        double bc = Math.sqrt(Math.pow(bx - cx, 2) + Math.pow(by - cy, 2));
        double ac = Math.sqrt(Math.pow(ax - cx, 2) + Math.pow(ay - cy, 2));
        double biggest = Math.max(Math.max(ab, bc), ac);
        if ((ab + bc + ac > 2 * biggest) && (ab == bc || ab == ac || bc == ac)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    static class Reader {

        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg) {
                return -ret;
            }
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg) {
                return -ret;
            }
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg) {
                c = read();
            }

            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg) {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null) {
                return;
            }
            din.close();
        }
    }
}

import java.util.Scanner;

public final class Main {

	public static long distSq(int x1, int y1, int x2, int y2) {
		return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ax = sc.nextInt();
		int ay = sc.nextInt();
		int bx = sc.nextInt();
		int by = sc.nextInt();
		int cx = sc.nextInt();
		int cy = sc.nextInt();
		sc.close();

		if (distSq(ax, ay, bx, by) != distSq(bx, by, cx, cy)) {
			System.out.println("No");
		} else {
			System.out.println("Yes");
		}
	}
}

import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException, InterruptedException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long ax = sc.nextLong(), ay = sc.nextLong();
		long bx = sc.nextLong(), by = sc.nextLong();
		long cx = sc.nextLong(), cy = sc.nextLong();
		long dist1 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
		long dist2 = (cx - bx) * (cx - bx) + (cy - by) * (cy - by);
		long dist3 = (cx - ax) * (cx - ax) + (cy - ay) * (cy - ay);
//		System.out.println(dist1 + " " + dist2 + " " + dist3);
		boolean colinear = Math.abs(Math.sqrt(dist3) - Math.sqrt(dist1) - Math.sqrt(dist2)) < 1e-5;
		if (dist1 == dist2 && !colinear) // ab = bc && a b c are not colinear
			out.println("yes");
		else
			out.println("no");
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String s) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] ans = new int[n];
			for (int i = 0; i < n; i++)
				ans[i] = nextInt();
			return ans;
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}

import java.util.*;
import java.text.*;

import javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener;

import java.io.*;
import java.math.*;
public class code5 {
	InputStream is;
	PrintWriter out;
	static long mod=pow(10,9)+7;
	static int dx[]={0,0,1,-1},dy[]={1,-1,0,0};
	void solve() throws Exception
	{
		int ax=ni();
		int ay=ni();
		int bx=ni();
		int by=ni();
		int cx=ni();
		int cy=ni();
		double distab=sqrt(pow((ax-bx),2)+pow((ay-by),2));
		double distbc=sqrt(pow((cx-bx),2)+pow((cy-by),2));
		double distca=sqrt(pow((ax-cx),2)+pow((ay-cy),2));
		//System.out.println(distab+" "+distbc+" "+distca);
		if(distab+distbc==distca||distab+distca==distbc||distca+distbc==distab)
			out.println("No");
		else {

			//System.out.println(distab+" "+distbc);
			if(Math.abs(distab-distbc)<=1e-6)
				out.println("Yes");
			else
				out.println("No");
		}
	}
	double sqrt(long num1)
	{
		double ans=-1,low=0,high=num1,num=num1;
		while(high-low>1e-9)
		{
			double mid=(low+high)/2;
			double val=num/mid;
			if(mid<=val)
			{
				ans=mid;
				low=mid+1e-9;
			}else
				high=mid-1e-9;
		}
		return ans;

	}
	public static int count(int x)
	{
		int num=0;
		while(x!=0)
		{
			x=x&(x-1);
			num++;
		}
		return num;
	}
	static long d, x, y;
	void extendedEuclid(long A, long B) {
	    if(B == 0) {
	        d = A;
	        x = 1;
	        y = 0;
	    }
	    else {
	        extendedEuclid(B, A%B);
	        long temp = x;
	        x = y;
	        y = temp - (A/B)*y;
	    }
	}
	long modInverse(long A,long M) //A and M are coprime
	{
	    extendedEuclid(A,M);
	    return (x%M+M)%M;    //x may be negative
	}
	public static void mergeSort(int[] arr, int l ,int r){
		if((r-l)>=1){
			int mid = (l+r)/2;
			mergeSort(arr,l,mid);
			mergeSort(arr,mid+1,r);
			merge(arr,l,r,mid);
		}
	}
	public static void merge(int arr[], int l, int r, int mid){
		int n1 = (mid-l+1), n2 = (r-mid);
		int left[] = new int[n1];
		int right[] = new int[n2];
		for(int i =0 ;i<n1;i++) left[i] = arr[l+i];
		for(int i =0 ;i<n2;i++) right[i] = arr[mid+1+i];
		int i =0, j =0, k = l;
		while(i<n1 && j<n2){
			if(left[i]>right[j]){
				arr[k++] = right[j++];
			}
			else{
				arr[k++] = left[i++];
			}
		}
		while(i<n1) arr[k++] = left[i++];
		while(j<n2) arr[k++] = right[j++];
	}
	public static void mergeSort(long[] arr, int l ,int r){
		if((r-l)>=1){
			int mid = (l+r)/2;
			mergeSort(arr,l,mid);
			mergeSort(arr,mid+1,r);
			merge(arr,l,r,mid);
		}
	}
	public static void merge(long arr[], int l, int r, int mid){
		int n1 = (mid-l+1), n2 = (r-mid);
		long left[] = new long[n1];
		long right[] = new long[n2];
		for(int i =0 ;i<n1;i++) left[i] = arr[l+i];
		for(int i =0 ;i<n2;i++) right[i] = arr[mid+1+i];
		int i =0, j =0, k = l;
		while(i<n1 && j<n2){
			if(left[i]>right[j]){
				arr[k++] = right[j++];
			}
			else{
				arr[k++] = left[i++];
			}
		}
		while(i<n1) arr[k++] = left[i++];
		while(j<n2) arr[k++] = right[j++];
	}
	 static class Pair implements Comparable<Pair>{

	       int x;long y,k;
	       int i,dir;
	       long cost;
		Pair (int x,long y){
			this.x=x;
			this.y=y;
		}
		public int compareTo(Pair o) {
				return this.i-o.i;
		}

		public String toString(){
			return x+" "+y+" "+k+" "+i;}
		public boolean equals(Object o) {
			if (o instanceof Pair) {
				Pair p = (Pair)o;
				return p.x == x && p.y == y ;
			}
			return false;
		}
		public int hashCode() {
			return new Long(x).hashCode()*31 + new Long(y).hashCode();
		}
	}

	    public static boolean isPal(String s){
	        for(int i=0, j=s.length()-1;i<=j;i++,j--){
	                if(s.charAt(i)!=s.charAt(j)) return false;
	        }
	        return true;
	    }
	    public static String rev(String s){
			StringBuilder sb=new StringBuilder(s);
			sb.reverse();
			return sb.toString();
	    }

	    public static long gcd(long x,long y){
		if(y==0)
			return x;
		else
			return gcd(y,x%y);
	    }

	    public static int gcd(int x,int y){
	    	if(y==0)
	    		return x;
	    	return gcd(y,x%y);
	    }

	    public static long gcdExtended(long a,long b,long[] x){

	        if(a==0){
	            x[0]=0;
	            x[1]=1;
	            return b;
	        }
	        long[] y=new long[2];
	        long gcd=gcdExtended(b%a, a, y);

	        x[0]=y[1]-(b/a)*y[0];
	        x[1]=y[0];

	        return gcd;
	    }

	    public static int abs(int a,int b){
		return (int)Math.abs(a-b);
	    }

	    public static long abs(long a,long b){
		return (long)Math.abs(a-b);
	    }

	    public static int max(int a,int b){
		if(a>b)
			return a;
		else
			return b;
	    }

	    public static int min(int a,int b){
		if(a>b)
			return b;
		else
			return a;
	    }

	    public static long max(long a,long b){
		if(a>b)
			return a;
		else
			return b;
	    }

	    public static long min(long a,long b){
		if(a>b)
			return b;
		else
			return a;
	    }

	    public static long pow(long n,long p,long m){
		 long  result = 1;
		  if(p==0)
		    return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    if(result>=m)
		    result%=m;
		    p >>=1;
		    n*=n;
		    if(n>=m)
		    n%=m;
		}
		return result;
	    }

	    public static long pow(long n,long p){
		long  result = 1;
		  if(p==0)
		    return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    p >>=1;
		    n*=n;
		}
		return result;
	    }
	    public static void debug(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
	    void run() throws Exception {
			is = System.in;
			out = new PrintWriter(System.out);
			solve();
			out.flush();
		}

	    public static void main(String[] args) throws Exception {
			new Thread(null, new Runnable() {
				public void run() {
					try {
						new code5().run();
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}, "1", 1 << 26).start();

	    	//new code5().run();
		}
	    private byte[] inbuf = new byte[1024];
		public int lenbuf = 0, ptrbuf = 0;

		private int readByte() {
			if (lenbuf == -1)
				throw new InputMismatchException();
			if (ptrbuf >= lenbuf) {
				ptrbuf = 0;
				try {
					lenbuf = is.read(inbuf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (lenbuf <= 0)
					return -1;
			}
			return inbuf[ptrbuf++];
		}

		private boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}

		private int skip() {
			int b;
			while ((b = readByte()) != -1 && isSpaceChar(b));
			return b;
		}

		private double nd() {
			return Double.parseDouble(ns());
		}

		private char nc() {
			return (char) skip();
		}

		private String ns() {
			int b = skip();
			StringBuilder sb = new StringBuilder();
			while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}

		private char[] ns(int n) {
			char[] buf = new char[n];
			int b = skip(), p = 0;
			while (p < n && !(isSpaceChar(b))) {
				buf[p++] = (char) b;
				b = readByte();
			}
			return n == p ? buf : Arrays.copyOf(buf, p);
		}

		private char[][] nm(int n, int m) {
			char[][] map = new char[n][];
			for (int i = 0; i < n; i++)
				map[i] = ns(m);
			return map;
		}

		private int[] na(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = ni();
			return a;
		}
		private long[] nl(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nl();
			return a;
		}

		private int ni() {
			int num = 0, b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

		private long nl() {
			long num = 0;
			int b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

}

import java.io.*;
import java.util.*;

public class Solution2 {

    private void solve() throws IOException {
        long ax = in.nextLong();
        long ay = in.nextLong();
        long bx = in.nextLong();
        long by = in.nextLong();
        long cx = in.nextLong();
        long cy = in.nextLong();
        if (ax == bx && ax == cx && ay == by && ay == cy) {
            System.out.println("Yes");
            return;
        }
        long r1 = (ax - bx) * (ax - bx);
        r1 += (ay - by) * (ay - by);
        long r2 = (bx - cx) * (bx - cx);
        r2 += (by - cy) * (by - cy);
        double k1 = (by - ay);
        k1 /= (bx - ax);
        double k2 = (cy - by);
        k2 /= (cx - bx);
        if (ax == bx && ay == by) {
            System.out.println("No");
            return;
        }
        if (bx == cx && by == cy) {
            System.out.println("No");
            return;
        }
        if (ax == cx && ay == cy) {
            System.out.println("Yes");
            return;
        }
        if (Math.abs(k1) == Math.abs(k2) && k1 >= 0.00000000001) {
            System.out.println("No");
            return;
        }
        if (r1 == r2) {
            System.out.println("Yes");
            return;
        }

        System.out.println("No");
    }

    private String filename = "";
    private PrintWriter out;
    MyScanner in;

    private void run() throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

    private class MyScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public MyScanner() throws IOException {
            this.br = new BufferedReader(new InputStreamReader(System.in));
        }

        public MyScanner(String fileTitle) throws IOException {
            this.br = new BufferedReader(new FileReader(fileTitle));
        }

        public String nextLine() throws IOException {
            String s = br.readLine();
            return s == null ? "-1" : s;
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return "-1";
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.parseInt(this.next());
        }

        public Long nextLong() throws IOException {
            return Long.parseLong(this.next());
        }

        public Double nextDouble() throws IOException {
            return Double.parseDouble(this.next());
        }

        public void close() throws IOException {
            this.br.close();
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Solution2().run();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.awt.geom.Point2D;
import java.util.StringTokenizer;
import java.awt.geom.Point2D.Double;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Allen Li
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            Point2D a = new Point2D.Double(in.nextInt(), in.nextInt());
            Point2D b = new Point2D.Double(in.nextInt(), in.nextInt());
            Point2D c = new Point2D.Double(in.nextInt(), in.nextInt());

            Point2D center = new Point2D.Double(0, 0);
            double yDa = b.getY() - a.getY();
            double xDa = b.getX() - a.getX();
            double yDb = c.getY() - b.getY();
            double xDb = c.getX() - b.getX();
            double s1 = yDa / xDa;
            double s2 = yDb / xDb;
            Point2D mid1 = mid(a, b);
            Point2D mid2 = mid(b, c);
            if (yDb == 0) {
                center.setLocation(mid2.getX(), 0);
                if (xDa == 0) {
                    center.setLocation(center.getX(), mid1.getY());
                } else {
                    center.setLocation(center.getX(), mid1.getY() + (mid1.getX() - mid2.getX()) / s1);
                }
            } else if (yDa == 0) {
                center.setLocation(mid1.getX(), 0);
                if (xDb == 0) {
                    center.setLocation(center.getX(), mid2.getY());
                } else {
                    center.setLocation(center.getX(), mid2.getY() + (mid2.getX() - mid1.getX()) / s2);
                }
            } else if (xDa == 0) {
                center.setLocation(s2 * (mid2.getX() - mid1.getY()) + mid2.getX(), mid1.getY());
            } else if (xDb == 0) {
                center.setLocation(s1 * (mid1.getX() - mid2.getY()) + mid1.getX(), mid2.getY());
            } else {
                center.setLocation((s1 * s2 * (mid1.getY() - mid2.getY()) - s1 * mid2.getX() + s2 * mid1.getX()) / (s2 - s1), 0);
                center.setLocation(center.getX(), mid1.getY() - (center.getX() - mid1.getX()) / s1);
            }
            if (s1 == s2) {
                center.setLocation((a.getX() + b.getX() + c.getX()) / 3, (a.getY() + b.getY() + c.getY()) / 3);
            }
            double dist = a.distance(center);
            if (dist != b.distance(center)) {
                out.println("No");
                return;
            }
            if (dist != c.distance(center)) {
                out.println("No");
                return;
            }
            if (a.distance(b) != b.distance(c)) {
                out.println("No");
                return;
            }
            out.println("Yes");
        }

        Point2D mid(Point2D p1, Point2D p2) {
            return new Point2D.Double((p1.getX() + p2.getX()) / 2, (p1.getY() + p2.getY()) / 2);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author HossamDoma
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int ax = in.nextInt();
            int ay = in.nextInt();

            int bx = in.nextInt();
            int by = in.nextInt();

            int cx = in.nextInt();
            int cy = in.nextInt();

            double ab = Math.sqrt((long) (ax - bx) * (ax - bx) + (long) (ay - by) * (ay - by));
            double bc = Math.sqrt((long) (bx - cx) * (bx - cx) + (long) (by - cy) * (by - cy));
            long ac = (long) (ax - cx) * (ax - cx) + (long) (ay - cy) * (ay - cy);

            // out.println(ab + " " + ac + " " + bc);

            if (ab != bc || ac == ac * (ab + bc)) {
                out.println("No");
            } else
                out.println("Yes");
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.*;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;

public class Main
{
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    public static void main(String[] args) throws IOException{
        Reader in = new Reader();
        int a = in.nextInt();
        int a1 = in.nextInt();
        int b = in.nextInt();
        int b1 = in.nextInt();
        int c = in.nextInt();
        int c1 = in.nextInt();
        double x = Math.pow(b1-a1, 2) + Math.pow(b-a, 2);
        double y = Math.pow(c1-b1, 2) + Math.pow(c-b, 2);
        double z = Math.pow(c1-a1, 2) + Math.pow(c-a, 2);

        if(x==y && (x+y==z || y==z)){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main (String[] args) throws java.lang.Exception {
        Output out = new Output();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        st = new StringTokenizer(br.readLine());
        int ax = Integer.parseInt(st.nextToken()),
            ay = Integer.parseInt(st.nextToken()),
            bx = Integer.parseInt(st.nextToken()),
            by = Integer.parseInt(st.nextToken()),
            cx = Integer.parseInt(st.nextToken()),
            cy = Integer.parseInt(st.nextToken());

        double[][] matrix = new double[3][3];
        double numerator1 = - (bx-ax);
        double denominator1 = (by-ay);
        if (numerator1 == 0) {
            matrix[0][0] = 0;
            matrix[0][1] = 1;
            matrix[0][2] = ((double)ay+by) / 2;
        } else if (denominator1 == 0) {
            matrix[0][0] = 1;
            matrix[0][1] = 0;
            matrix[0][2] = ((double)ax+bx) / 2;
        } else {
            matrix[0][0] = - (numerator1/denominator1);
            matrix[0][1] = 1;
            matrix[0][2] = ((double)ay+by)/2 - (-1)*matrix[0][0]*((double)bx+ax)/2;
        }
        double numerator2 = - (cx-bx);
        double denominator2 = (cy-by);
        if (numerator2 == 0) {
            matrix[1][0] = 0;
            matrix[1][1] = 1;
            matrix[1][2] = ((double)by+cy) / 2;
        } else if (denominator2 == 0) {
            matrix[1][0] = 1;
            matrix[1][1] = 0;
            matrix[1][2] = ((double)bx+cx) / 2;
        } else {
            matrix[1][0] = - (numerator2/denominator2);
            matrix[1][1] = 1;
            matrix[1][2] = ((double)by+cy)/2 - (-1)*matrix[1][0]*((double)bx+cx)/2;
        }
        double numerator3 = - (cx-ax);
        double denominator3 = (cy-ay);
        if (numerator3 == 0) {
            matrix[2][0] = 0;
            matrix[2][1] = 1;
            matrix[2][2] = ((double)ay+cy) / 2;
        } else if (denominator3 == 0) {
            matrix[2][0] = 1;
            matrix[2][1] = 0;
            matrix[2][2] = ((double)ax+cx) / 2;
        } else {
            matrix[2][0] = -(numerator3/denominator3);
            matrix[2][1] = 1;
            matrix[2][2] = ((double)ay+cy)/2 - (-1)*matrix[2][0]*((double)ax+cx)/2;
        }

        if ((numerator1 == 0 && numerator2 == 0) || (numerator2==0 && numerator3==0) || (numerator1==0 && numerator3== 0)) {
            out.println("No");
            out.flush();
            return;
        } else if ((denominator1 == 0 && denominator2 == 0) || (denominator2==0 && denominator3==0) || (denominator1==0 && denominator3== 0)) {
            out.println("No");
            out.flush();
            return;
        }

        if (matrix[0][0] == 0) {
            for (int i=1 ; i<3 ; i++) {
                if (matrix[i][0] != 0) {
                    double[] temp = matrix[i];
                    matrix[i] = matrix[0];
                    matrix[0] = temp;
                    break;
                }
            }
        }
        if (matrix[1][1] == 0) {
            double[] temp = matrix[2];
            matrix[2] = matrix[1];
            matrix[1] = temp;
        }

        if (matrix[1][0] != 0) {
            double k1 = matrix[1][0] / matrix[0][0];
            matrix[1][0] -= k1 * matrix[0][0];
            matrix[1][1] -= k1 * matrix[0][1];
            matrix[1][2] -= k1 * matrix[0][2];
        }
        if (matrix[0][1] != 0) {
            double k = matrix[0][1] / matrix[1][1];
            matrix[0][1] -= k * matrix[1][1];
            matrix[0][2] -= k * matrix[1][2];
        }

        matrix[2][2] -= matrix[0][2] * matrix[2][0];
        matrix[2][2] -= matrix[1][2] * matrix[2][1];
        if (matrix[2][2] == 0) out.println("Yes");
        else out.println("No");
        out.flush();
    }

}

class Output {
    private BufferedWriter out;

    Output() {
        this.out = new BufferedWriter(new OutputStreamWriter(System.out));
    }

    void print(String s) throws IOException {this.out.write(s);}
    void println(String s) throws IOException {this.out.write(s + "\n");}
    void println(long n) throws IOException {this.out.write(n + "\n");}
    void println(double n) throws IOException {this.out.write(n + "\n");}
    void println(int n) throws IOException {this.out.write(n + "\n");}
    void flush () throws IOException {this.out.flush();}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Debabrata
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ArpaAndExamAboutGeometry solver = new ArpaAndExamAboutGeometry();
        solver.solve(1, in, out);
        out.close();
    }

    static class ArpaAndExamAboutGeometry {
        public void solve(int testNumber, InputReader scan, OutputWriter out) {
            long x1 = scan.nextLong();
            long y1 = scan.nextLong();
            ArpaAndExamAboutGeometry.point a = new ArpaAndExamAboutGeometry.point(x1, y1);
            long x2 = scan.nextLong();
            long y2 = scan.nextLong();
            ArpaAndExamAboutGeometry.point b = new ArpaAndExamAboutGeometry.point(x2, y2);
            long x3 = scan.nextLong();
            long y3 = scan.nextLong();
            ArpaAndExamAboutGeometry.point c = new ArpaAndExamAboutGeometry.point(x3, y3);
            double m1 = (y2 - y1) / (double) (x2 - x1);
            double m2 = (y3 - y1) / (double) (x3 - x1);
            if (m1 == m2) {
                out.println("No");
                return;
            }
            double angle1 = getAngle(a);
            double angle2 = getAngle(b);
            double angle3 = getAngle(c);
            if (Math.abs(angle2 - angle1) != Math.abs(angle3 - angle2)) {
                out.println("No");
                return;
            }
            out.println("Yes");
        }

        public double getAngle(ArpaAndExamAboutGeometry.point target) {
            double angle = (double) Math.toDegrees(Math.atan2(target.y - 0, target.x - 0));

            if (angle < 0) {
                angle += 360;
            }

            return angle;
        }

        static class point {
            long x;
            long y;

            public point(long x, long y) {
                this.x = x;
                this.y = y;
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}

import java.util.*;

public class Test {
	public static void main(String[] args) {
	    Scanner in = new Scanner(System.in);
	    String input = in.nextLine();
		String[] strs = input.trim().split(" ");
		int[] ins = new int[strs.length];

		for (int i = 0; i < strs.length; i++) {
			ins[i] = Integer.parseInt(strs[i]);
		}

		if((ins[0] == ins[1]) && (ins[2] == ins[3]) && (ins[4] == ins[5])) {
			System.out.print("No");
		}
		else if((ins[0] == ins[2]) && (ins[2] == ins[4])) {
			System.out.print("No");
		}
		else if((ins[1] == ins[3]) && (ins[3] == ins[5])) {
			System.out.print("No");
		}
		else if(Math.hypot(ins[0] - ins[2], ins[1] - ins[3]) != Math.hypot(ins[2] - ins[4], ins[3] - ins[5])) {
			System.out.print("No");
		}
		else {
			System.out.print("Yes");
		}
	}
}

import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    static long distance(int x, int y, int xx, int yy) {
        return (x - xx) * (x - xx) + (y - yy) * (y - yy);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int ax = in.nextInt(), ay = in.nextInt();
        int bx = in.nextInt(), by = in.nextInt();
        int cx = in.nextInt(), cy = in.nextInt();
        if (distance(ax, ay, bx, by) != distance(bx, by, cx, cy) ||
                (bx - ax) * (cy - ay) == (by - ay) * (cx - ax)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class B {
    public static long dist(long[] A, long[] B) {
        long ft = A[0] - B[0];
        long st = A[1] - B[1];
        if(st < 0) {
            st = -st;
        }
        if(ft < 0) {
            ft = -ft;
        }

        return ft + st;
    }
    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String[] axaybxbycxcy = br.readLine().split(" ");
        long[] A = new long[]{Long.parseLong(axaybxbycxcy[0]), Long.parseLong(axaybxbycxcy[1])};
        long[] B = new long[]{Long.parseLong(axaybxbycxcy[2]), Long.parseLong(axaybxbycxcy[3])};
        long[] C = new long[]{Long.parseLong(axaybxbycxcy[4]), Long.parseLong(axaybxbycxcy[5])};

        System.out.println(dist(A, B) == dist(B, C) ? "Yes" : "No");
    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Main implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}

	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Main(),"Main",1<<26).start();
	}
	double pow2(double a)
    {
        return a*a;
    }
	public void run()
	{
		InputReader sc= new InputReader(System.in);
		PrintWriter w= new PrintWriter(System.out);
		double ax=sc.nextDouble();
        double ay=sc.nextDouble();
        double bx=sc.nextDouble();
        double by=sc.nextDouble();
        double cx=sc.nextDouble();
        double cy=sc.nextDouble();
        double dist1=Math.sqrt(pow2(ax-bx)+pow2(ay-by));
        double dist2=Math.sqrt(pow2(bx-cx)+pow2(by-cy));
        if(dist1==dist2)
            w.print("Yes");
        else
            w.print("No");
		w.close();
	}
}

import java.util.*;
public class PB904 {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long ax = sc.nextLong();
		long ay = sc.nextLong();
		long bx = sc.nextLong();
		long by = sc.nextLong();
		long cx = sc.nextLong();
		long cy = sc.nextLong();

		if(Math.abs(ax - bx) * Math.abs(ax - bx) + Math.abs(ay - by) * Math.abs(ay - by) == Math.abs(cx - bx) * Math.abs(cx - bx) + Math.abs(cy - by) * Math.abs(cy - by)){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}

		sc.close();
	}

}

////package CodeForce;
///package CodeForce;

import java.util.*;
import java.io.*;
public class Round432B {

	public static void main(String[] ard)  throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw=new PrintWriter(System.out);
		String[] s=br.readLine().trim().split("\\s++");
		int x1=Integer.valueOf(s[0]);
		int y1=Integer.valueOf(s[1]);
		int x2=Integer.valueOf(s[2]);
		int y2=Integer.valueOf(s[3]);
		int x3=Integer.valueOf(s[4]);
		int y3=Integer.valueOf(s[5]);
		double d1=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		double d2=Math.sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
		boolean b=false;
		int m1=0;
		int m2=0;
		if(x2-x1!=0)
		 m1=(y2-y1)/(x2-x1);
		if(x3-x2!=0)
		    m2=(y3-y2)/(x3-x2);
		if(m1!=m2)b=true;
		if(d1==d2&&!b)pw.println("Yes");
		else pw.println("No");
	pw.close();

	}
	public static boolean palin(int[] A)
	{
		int i=0;
		int j=A.length-1;
		while(i!=j)
		{
			if(A[i]!=A[j])return false;
			i++;
			j--;
		}
	   return true;
	}
	/*public static boolean[] Seive()
	{

		 b=new boolean[10000001];
		Arrays.fill(b, true);
		b[0]=false;
		b[1]=false;

		for(int i=2;i<=Math.sqrt(10000000);i++)
		{
			if(b[i])
			{

			 for(int j=i*2;j<=10000000;j+=i)
				{
					     b[j]=false;

				}
			}

		}
		return b;
	}*/
	public static class Merge {
		public void sort(int inputArr[]) {
	        int length = inputArr.length;
	        doMergeSort(inputArr,0, length - 1);
	    }
	    private void doMergeSort(int[] arr,int lowerIndex, int higherIndex) {
	        if (lowerIndex < higherIndex) {
	            int middle = lowerIndex + (higherIndex - lowerIndex) / 2;
	            doMergeSort(arr,lowerIndex, middle);
	            doMergeSort(arr,middle + 1, higherIndex);
	            mergeParts(arr,lowerIndex, middle, higherIndex);
	        }
	    }
	    private void mergeParts(int[]array,int lowerIndex, int middle, int higherIndex) {
	    	int[] temp=new int[higherIndex-lowerIndex+1];
	        for (int i = lowerIndex; i <= higherIndex; i++) {
	            temp[i-lowerIndex] = array[i];
	        }
	        int i = lowerIndex;
	        int j = middle + 1;
	        int k = lowerIndex;
	        while (i <= middle && j <= higherIndex) {
	            if (temp[i-lowerIndex] < temp[j-lowerIndex]) {
	                array[k] = temp[i-lowerIndex];
	                i++;
	            } else {
	                array[k] = temp[j-lowerIndex];
	                j++;
	                //cnt+=(middle+1-i);
	            }
	            k++;
	        }
	        while (i <= middle) {
	            array[k] = temp[i-lowerIndex];
	            k++;
	            i++;
	        }
	        while(j<=higherIndex){
	        	array[k]=temp[j-lowerIndex];
	        	k++;
	        	j++;
	        }
	        /*pw.println(lowerIndex+" "+higherIndex);
	        for(int m=lowerIndex;m<=higherIndex;m++)
	        	pw.print(array[m]+" ");
	        pw.println();*/
	    }
	}
		private static class DSU{
			int[] parent;
			int[] rank;
			int cnt;
			public DSU(int n){
				parent=new int[n];
				rank=new int[n];
				for(int i=0;i<n;i++){
					parent[i]=i;
					rank[i]=1;
				}
				cnt=n;
			}
			int find(int i){
		        while(parent[i] !=i){
		        	parent[i]=parent[parent[i]];
		        	i=parent[i];
		        }
		        return i;
		    }
			int Union(int x, int y){
		        int xset = find(x);
		        int yset = find(y);
		        if(xset!=yset)
		        	cnt--;
		        if(rank[xset]<rank[yset]){
		        	parent[xset] = yset;
			        rank[yset]+=rank[xset];
			        rank[xset]=0;
			        return yset;
		        }else{
		        	parent[yset]=xset;
		        	rank[xset]+=rank[yset];
		        	rank[yset]=0;
		        	return xset;
		        }
		    }
		}
		static void multiply(long[][] a, long[][] b,long m){
			int n=a.length;
		    long[][] mul=new long[n][n];
		    for (int i = 0; i < n; i++){
		        for (int j = 0; j < n; j++){
		            mul[i][j] = 0;
		            for (int k = 0; k < n; k++)
		                mul[i][j] = (mul[i][j]+(a[i][k]*b[k][j])%m)%m;
		        }
		    }
		    for (int i=0; i<n; i++)
		        for (int j=0; j<n; j++)
		            a[i][j] =mul[i][j];
		}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class B {
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(in.readLine());

		final int ax = Integer.parseInt(st.nextToken());
		final int ay = Integer.parseInt(st.nextToken());
		final int bx = Integer.parseInt(st.nextToken());
		final int by = Integer.parseInt(st.nextToken());
		final int cx = Integer.parseInt(st.nextToken());
		final int cy = Integer.parseInt(st.nextToken());

		double D = 2*(ax*(by-cy) + bx*(cy-ay) + cx*(ay-by));
		if(D == 0){
			System.out.println("NO");
			System.exit(0);
		}
		double ox = ((ax*ax+ay*ay)*(by-cy) + (bx*bx+by*by)*(cy-ay) + (cx*cx+cy*cy)*(ay-by))/D;
		double oy = ((ax*ax+ay*ay)*(cx-bx) + (bx*bx+by*by)*(ax-cx) + (cx*cx+cy*cy)*(bx-ax))/D;

		double angle1 = (ax-ox)*(bx-ox) + (ay-oy)*(by-oy);
		double angle2 = (bx-ox)*(cx-ox) + (by-oy)*(cy-oy);

		//System.out.println(ox + " " + oy);
		//System.out.println(angle1 + "  " + angle2);

		if(Math.abs(angle1-angle2)/Math.max(1, angle2) < 1e-3) System.out.println("Yes");
		else System.out.println("No");

	}
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

 public static void main(String[] args) {
     try{
         Scanner s1 = new Scanner(System.in);
         int x1=s1.nextInt();
         int y1=s1.nextInt();
         int x2=s1.nextInt();
         int y2=s1.nextInt();
         int x3=s1.nextInt();
         int y3=s1.nextInt();
         double dist1=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
         dist1=Math.sqrt(dist1);
         double dist2=(x2-x3)*(x2-x3)+(y2-y3)*(y2-y3);
         dist2=Math.sqrt(dist1);
         if((x1==x2 && x2==x3) || (y1==y2 && y2==y3) || (x1==y1 && x2==y2 && x3==y3) || (dist1!=dist2))
             System.out.println("No");
         else
             System.out.println("Yes");
     }
     catch(Exception e)
     {}

   }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.PrintWriter;
public class D851
{
    static class Scanner
    {
        BufferedReader br;
        StringTokenizer tk=new StringTokenizer("");
        public Scanner(InputStream is)
        {
            br=new BufferedReader(new InputStreamReader(is));
        }
        public int nextInt() throws IOException
        {
            if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
                return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
            if(tk.hasMoreTokens())
                return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
            tk=new StringTokenizer("");
            return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
                return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
                return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
                a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
            long a[]=new long[n];
            for(int i=0;i<n;i++)
                a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
            int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
                a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
            long a[]=new long[n+1];
            for(int i=1;i<=n;i++)
                a[i]=nextLong();
            return a;
        }

    }

    public static void main(String args[]) throws IOException
    {
        Scanner in=new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);
        int n=in.nextInt();
        int k=in.nextInt();
        int t=in.nextInt();
        if(t<=k)
            out.println(t);
        else if(n+k-t<=k)
            out.println(n+k-t);
        else
            out.println(k);
        out.close();
    }

}

import java.io.*;
import java.util.*;

public class b
{
	public static void main(String[] args)
	{
		FastScanner in = new FastScanner();
		Point points[] = new Point[3];

		for(int i = 0; i < 3; i++)
			points[i] = new Point(in.nextDouble(), in.nextDouble());

		double a1 = points[0].x;
		double b1 = points[1].x;
		double c1 = points[2].x;
		double a2 = points[0].y;
		double b2 = points[1].y;
		double c2 = points[2].y;

		double dist1 = points[0].dist(points[1]);
//		double dist2 = points[0].dist(points[2]);
		double dist3 = points[1].dist(points[2]);

		if(c1 == (-a2+b1+b2) && c2 == (a1-b1+b2))
		{
			double p1 = 0.5*(a1-a2+b1+b2);
			double p2 = 0.5*(a1+a2-b2+b2);

			Point rotateA = rotate(p1, p2, -90, points[0]);
			Point rotateB = rotate(p1, p2, -90, points[1]);

//			System.out.println(rotateA + " = " + points[1]);
//			System.out.println(rotateB + " = " + points[2]);

			if(equals(rotateA.x, points[1].x) && equals(rotateA.y, points[1].y)
					&& equals(rotateB.x, points[2].x) && equals(rotateB.y, points[2].y))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else if(c1 == (a2+b1-b2) && c2 == (-a1+b1+b2))
		{
			double p1 = 0.5*(a1+a2+b1-b2);
			double p2 = 0.5*(-a1+a2+b1+b2);

			Point rotateA = rotate(p1, p2, 90, points[0]);
			Point rotateB = rotate(p1, p2, 90, points[1]);

//			System.out.println(rotateA + " = " + points[1]);
//			System.out.println(rotateB + " = " + points[2]);

			if(equals(rotateA.x, points[1].x) && equals(rotateA.y, points[1].y)
					&& equals(rotateB.x, points[2].x) && equals(rotateB.y, points[2].y))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
		else
			System.out.println("No");

//		double dist1 = points[0].dist(points[1]);
//		double dist2 = points[0].dist(points[2]);
//		double dist3 = points[1].dist(points[2]);

//		System.out.println(c1 + " " + (-a2+b1+b2));
//		System.out.println(c2 + " " + (a1-b1+b2));
//		System.out.println(0.5*(a1-a2+b1+b2));
//		System.out.println(0.5*(a1+a2-b2+b2));
//		System.out.println(0.5*(a1+a2+b1-b2));
//		System.out.println(0.5*(-a1+a2+b1+b2));
//		System.out.println();
//		System.out.println(c1 + " " + (a2+b1-b2));
//		System.out.println(c2 + " " + (-a1+b1+b2));

//		System.out.println(dist1);
//		System.out.println(dist2);
//		System.out.println(dist3);

//		if(dist1 == dist2 || dist2 == dist3 || dist1 == dist3)
//			System.out.println("Yes");
//		else
//			System.out.println("No");
	}

	private static boolean equals(double a, double b)
	{
		return Math.abs(a-b) < 1e-5;
	}

	private static Point rotate(double p1, double p2, int a, Point cur)
	{
		double s = Math.sin(Math.toRadians(a));
		double c = Math.cos(Math.toRadians(a));

		Point p = new Point(cur.x - p1, cur.y - p2);

		double newX = p.x * c - p.y * s;
		double newY = p.x * s + p.y * c;

		p.x = newX + p1;
		p.y = newY + p2;
		return p;
	}

	public static class Point
	{
		double x, y;

		public Point(double xx, double yy)
		{
			x = xx;
			y = yy;
		}

		public double dist(Point o)
		{
			double dx = x-o.x;
			double dy = y-o.y;
			return Math.sqrt(dx*dx+dy*dy);
		}

		public String toString()
		{
			return x + " " + y;
		}
	}

	public static class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s)
		{
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner()
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken()
		{
			while (st == null || !st.hasMoreElements())
			{
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt()
		{
			return Integer.parseInt(nextToken());
		}

		long nextLong()
		{
			return Long.parseLong(nextToken());
		}

		double nextDouble()
		{
			return Double.parseDouble(nextToken());
		}

		String next()
		{
			return nextToken();
		}
	}
}

import java.util.Scanner;

public class B {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int ax = s.nextInt();
    int ay = s.nextInt();
    int bx = s.nextInt();
    int by = s.nextInt();
    int cx = s.nextInt();
    int cy = s.nextInt();

    if (bx == ax) {
      if (cx == ax) {
        System.out.println("NO");
        return;
      }
    }

    long v1 = (by - ay) * (cx - bx);
    long v2 = (cy - by) * (bx - ax);
    if (v1 == v2) {
      System.out.println("NO");
      return;
    }

    long dab = ((by - ay) << 2) + ((bx - ax) << 2);
    long dbc = ((cy - by) << 2) + ((cx - bx) << 2);
    System.out.println((dab + dbc != 0) ? "NO" : "YES");
  }

}

import java.util.*;
import java.io.*;
import java.lang.*;
public class Solution{
    static double calcDist(int a,int b,int c,int d){
        return Math.sqrt(((c-a)*(c-a)+(d-b)*(d-b)));
    }
    public static void main(String[] args){

    Scanner in = new Scanner(System.in);
    int ax = in.nextInt();
    int ay = in.nextInt();
    int bx = in.nextInt();
    int by = in.nextInt();
    int cx = in.nextInt();
    int cy = in.nextInt();

    double distab = calcDist(ax,ay,bx,by);
    double distbc = calcDist(bx,by,cx,cy);
    double distac = calcDist(ax,ay,cx,cy);
    // float slopeab = (by-ay)/(bx-ax);
    // float slopebc = (cy-by)/(cx-bx);
    // if(distab+distac>distbc&&distbc+distab>distac&&distac+distbc>distab){
    if(distab!=distbc){System.out.println("No");}
        // else{System.out.println("No");}
    // }
    else if((by-ay)*(cx-bx)==(cy-by)*(bx-ax)){
        System.out.println("No");
    }

    else System.out.println("Yes");

    }
}

import java.util.*;
public class Test{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int b1 = sc.nextInt();
		int b2 = sc.nextInt();
		int c1 = sc.nextInt();
		int c2= sc.nextInt();
		double slope1 = Double.POSITIVE_INFINITY,slope2 = Double.POSITIVE_INFINITY,slope3 = Double.POSITIVE_INFINITY;
		if(a1 != b1)
			 slope1 = (a2 - b2)/(a1 - b1);
		if(c1 != b1)
			slope2 = (c2 - b2)/(c1 - b1);
		if(c1 != a1)
			slope3 = (c2 - a2)/(c1 - a1);
		if(slope1 == slope2&&slope2 == slope3)
			System.out.println("No");
		else
			System.out.println("Yes");

	}
}

import java.util.*;
import java.io.*;
import java.lang.*;
public class Solution{
    static double calcDist(int a,int b,int c,int d){
        return Math.sqrt(((c-a)*(c-a)+(d-b)*(d-b)));
    }
    public static void main(String[] args){

    Scanner in = new Scanner(System.in);
    int ax = in.nextInt();
    int ay = in.nextInt();
    int bx = in.nextInt();
    int by = in.nextInt();
    int cx = in.nextInt();
    int cy = in.nextInt();

    double distab = calcDist(ax,ay,bx,by);
    double distbc = calcDist(bx,by,cx,cy);
    double distac = calcDist(ax,ay,cx,cy);
    // float slopeab = (by-ay)/(bx-ax);
    // float slopebc = (cy-by)/(cx-bx);
    //determinant----> |A|=0
    // |ax ay 1|
    // |bx by 1|
    // |cx cy 1|
    if(ax*(by-cy)-ay*(bx-cx)+bx*cy-cx*by==0){
        System.out.println("No");
    }
    else if(distab!=distbc){System.out.println("No");}

    else if((by-ay)*(cx-bx)==(cy-by)*(bx-ax)){
        System.out.println("No");
    }

    else System.out.println("Yes");

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B851 solver = new B851();
        solver.solve(1, in, out);
        out.close();
    }

    static class B851 {
        public void solve(int testNumber, FastScanner s, PrintWriter out) {

            long Ax = s.nextLong(), Ay = s.nextLong(), Bx = s.nextLong(), By = s.nextLong(), Cx = s.nextLong(), Cy = s.nextLong();
            if (Math.abs(((1.0 * By - Ay) / (1.0 * Bx - Ax)) - (1.0 * By - Cy) / (1.0 * Bx - Cx)) < 0.00000001) {
                out.println("No");
                return;
            }
            double d1 = Math.sqrt(Math.pow(Bx - Ax, 2) + Math.pow(By - Ay, 2));
            double d2 = Math.sqrt(Math.pow(Bx - Cx, 2) + Math.pow(By - Cy, 2));
            if (Math.abs(d1 - d2) > 0.00000001) {
                out.println("No");
                return;
            }
            out.println("Yes");

        }

    }

    static class FastScanner {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public FastScanner(InputStream stream) {
            this.stream = stream;
        }

        int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

    }
}

import java.io.*;
import java.util.*;

public class b
{
	public static void main(String[] args)
	{
		FastScanner in = new FastScanner();
		Point points[] = new Point[3];

		for(int i = 0; i < 3; i++)
			points[i] = new Point(in.nextDouble(), in.nextDouble());

		double a1 = points[0].x;
		double b1 = points[1].x;
		double c1 = points[2].x;
		double a2 = points[0].y;
		double b2 = points[1].y;
		double c2 = points[2].y;

		double dist1 = points[0].dist(points[1]);
//		double dist2 = points[0].dist(points[2]);
		double dist3 = points[1].dist(points[2]);

		if(c1 == (-a2+b1+b2) && c2 == (a1-b1+b2) && 0.5*(a1-a2+b1+b2) == 0.5*(a1+a2-b2+b2))
			System.out.println("Yes");
		else if(c1 == (a2+b1-b2) && c2 == (-a1+b1+b2) && 0.5*(a1+a2+b1-b2) == 0.5*(-a1+a2+b2+b2))
			System.out.println("Yes");
		else
			System.out.println("No");

//		double dist1 = points[0].dist(points[1]);
//		double dist2 = points[0].dist(points[2]);
//		double dist3 = points[1].dist(points[2]);

//		System.out.println(c1 + " " + (-a2+b1+b2));
//		System.out.println(c2 + " " + (a1-b1+b2));
//		System.out.println(0.5*(a1-a2+b1+b2));
//		System.out.println(0.5*(a1+a2-b2+b2));
//		System.out.println(0.5*(a1+a2+b1-b2));
//		System.out.println(0.5*(-a1+a2+b2+b2));
//		System.out.println();
//		System.out.println(c1 + " " + (a2+b1-b2));
//		System.out.println(c2 + " " + (-a1+b1+b2));

//		System.out.println(dist1);
//		System.out.println(dist2);
//		System.out.println(dist3);

//		if(dist1 == dist2 || dist2 == dist3 || dist1 == dist3)
//			System.out.println("Yes");
//		else
//			System.out.println("No");
	}

	public static class Point
	{
		double x, y;

		public Point(double xx, double yy)
		{
			x = xx;
			y = yy;
		}

		public double dist(Point o)
		{
			double dx = x-o.x;
			double dy = y-o.y;
			return Math.sqrt(dx*dx+dy*dy);
		}
	}

	public static class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s)
		{
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner()
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken()
		{
			while (st == null || !st.hasMoreElements())
			{
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt()
		{
			return Integer.parseInt(nextToken());
		}

		long nextLong()
		{
			return Long.parseLong(nextToken());
		}

		double nextDouble()
		{
			return Double.parseDouble(nextToken());
		}

		String next()
		{
			return nextToken();
		}
	}
}

////package CodeForce;
////package CodeForce;

import java.util.*;
import java.io.*;
public class Round432B {
	 static LinkedHashMap<Long,Long> memo;
	public static void main(String[] ard)  throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw=new PrintWriter(System.out);
		String[] s=br.readLine().trim().split("\\s++");
		long x1=Long.valueOf(s[0]);
		long y1=Long.valueOf(s[1]);
		long x2=Long.valueOf(s[2]);
		long y2=Long.valueOf(s[3]);
		long x3=Long.valueOf(s[4]);
		long y3=Long.valueOf(s[5]);
		double d1=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		double d2=Math.sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
		double m1=Math.atan2(y2-y1, x2-x1);
		double m2=Math.atan2(y3-y2, x3-x2);
		if(d1==d2)pw.println("Yes");
		else pw.println("No");
	pw.close();

	}
	public static boolean palin(int[] A)
	{
		int i=0;
		int j=A.length-1;
		while(i!=j)
		{
			if(A[i]!=A[j])return false;
			i++;
			j--;
		}
	   return true;
	}
	/*public static boolean[] Seive()
	{

		 b=new boolean[10000001];
		Arrays.fill(b, true);
		b[0]=false;
		b[1]=false;

		for(int i=2;i<=Math.sqrt(10000000);i++)
		{
			if(b[i])
			{

			 for(int j=i*2;j<=10000000;j+=i)
				{
					     b[j]=false;

				}
			}

		}
		return b;
	}*/
	public long grundy(long a) {
        if (a <= 2) return a;
        boolean[] tmpArr = new boolean[35];
        Long tmp = memo.get(a);
        if (tmp != null) return tmp;
        for (int j = 0; j < 35; j++) {
            if (a < (1L << j)) break;
            long next = ((1L << j) - 1) & a;
            next |= a >>> (j + 1);
            tmpArr[(int) grundy(next)] = true;
        }
        for (int j = 0; j < 35; j++) {
            if (!tmpArr[j]) {
                memo.put(a, (long) j);
                return j;
            }
        }
        return 0;
    }

public class PrimeRoutines {

		int[] lowDivIdx;
		int[] lowDiv;
		int[] p;
		int N;

		public PrimeRoutines(int N) {
			this.N = N;
			p = new int[(int)(N / Math.log(N))];
			lowDivIdx = new int[N + 1];
			lowDiv = new int[N + 1];
			Arrays.fill(lowDivIdx, -1);
			int pCnt = 0;
			for (int i = 2; i <= N; i++) {
				if (lowDivIdx[i] == -1) {
					if (p.length == pCnt) {
						p = Arrays.copyOf(p, 2 * p.length);
					}
					lowDivIdx[i] = pCnt;
					lowDiv[i] = i;
					p[pCnt++] = i;
				}
				int toJ = Math.min(pCnt, lowDivIdx[i] + 1);
				for (int j = 0; j < toJ; j++) {
					int x = i * p[j];
					if (x > N) {
						break;
					}
					lowDivIdx[x] = j;
					lowDiv[x] = p[j];
				}
			}
			p = Arrays.copyOf(p, pCnt);
		}

		int[] divCount() {
			int[] ret = new int[N + 1];
			int[] tmp = new int[N + 1];
			ret[1] = 1;
			for (int i = 2; i <= N; i++) {
				int p = lowDiv[i];
				int j = i / p;
				if (p == lowDiv[j]) {
					int k = tmp[j];
					ret[i] = ret[j] / k * (k + 1);
					tmp[i] = k + 1;
				} else {
					ret[i] = ret[j] * 2;
					tmp[i] = 2;
				}
			}
			return ret;
		}

		List<Integer> getDivsNotSorted(int x) {
			List<Integer> ret = new ArrayList<Integer>(0);
			ret.add(1);
			while (x > 1) {
				int sz = ret.size();
				int pr = lowDiv[x];
				while (lowDiv[x] == pr) {
					int to = ret.size();
					for (int i = ret.size() - sz; i < to; i++) {
						ret.add(ret.get(i) * pr);
					}
					x /= pr;
				}
			}
			return ret;
		}

		int[] moebiusFunction() {
			int[] mu = new int[N + 1];
			mu[1] = 1;
			for (int i = 2; i <= N; i++) {
				int p = lowDiv[i];
				int j = i / p;
				if (p != lowDiv[j]) {
					mu[i] = -mu[j];
				}
			}
			return mu;
		}

		int[] eulerFunction() {
			int[] phi = new int[N + 1];
			phi[1] = 1;
			for (int i = 2; i <= N; i++) {
				int p = lowDiv[i];
				int j = i / p;
				phi[i] = phi[j] * (p != lowDiv[j] ? p - 1 : p);
			}
			return phi;
		}
	}

	public static class Merge {
		public void sort(int inputArr[]) {
	        int length = inputArr.length;
	        doMergeSort(inputArr,0, length - 1);
	    }
	    private void doMergeSort(int[] arr,int lowerIndex, int higherIndex) {
	        if (lowerIndex < higherIndex) {
	            int middle = lowerIndex + (higherIndex - lowerIndex) / 2;
	            doMergeSort(arr,lowerIndex, middle);
	            doMergeSort(arr,middle + 1, higherIndex);
	            mergeParts(arr,lowerIndex, middle, higherIndex);
	        }
	    }
	    private void mergeParts(int[]array,int lowerIndex, int middle, int higherIndex) {
	    	int[] temp=new int[higherIndex-lowerIndex+1];
	        for (int i = lowerIndex; i <= higherIndex; i++) {
	            temp[i-lowerIndex] = array[i];
	        }
	        int i = lowerIndex;
	        int j = middle + 1;
	        int k = lowerIndex;
	        while (i <= middle && j <= higherIndex) {
	            if (temp[i-lowerIndex] < temp[j-lowerIndex]) {
	                array[k] = temp[i-lowerIndex];
	                i++;
	            } else {
	                array[k] = temp[j-lowerIndex];
	                j++;
	                //cnt+=(middle+1-i);
	            }
	            k++;
	        }
	        while (i <= middle) {
	            array[k] = temp[i-lowerIndex];
	            k++;
	            i++;
	        }
	        while(j<=higherIndex){
	        	array[k]=temp[j-lowerIndex];
	        	k++;
	        	j++;
	        }
	        /*pw.println(lowerIndex+" "+higherIndex);
	        for(int m=lowerIndex;m<=higherIndex;m++)
	        	pw.print(array[m]+" ");
	        pw.println();*/
	    }
	}
		private static class DSU{
			int[] parent;
			int[] rank;
			int cnt;
			public DSU(int n){
				parent=new int[n];
				rank=new int[n];
				for(int i=0;i<n;i++){
					parent[i]=i;
					rank[i]=1;
				}
				cnt=n;
			}
			int find(int i){
		        while(parent[i] !=i){
		        	parent[i]=parent[parent[i]];
		        	i=parent[i];
		        }
		        return i;
		    }
			int Union(int x, int y){
		        int xset = find(x);
		        int yset = find(y);
		        if(xset!=yset)
		        	cnt--;
		        if(rank[xset]<rank[yset]){
		        	parent[xset] = yset;
			        rank[yset]+=rank[xset];
			        rank[xset]=0;
			        return yset;
		        }else{
		        	parent[yset]=xset;
		        	rank[xset]+=rank[yset];
		        	rank[yset]=0;
		        	return xset;
		        }
		    }
		}
		static void multiply(long[][] a, long[][] b,long m){
			int n=a.length;
		    long[][] mul=new long[n][n];
		    for (int i = 0; i < n; i++){
		        for (int j = 0; j < n; j++){
		            mul[i][j] = 0;
		            for (int k = 0; k < n; k++)
		                mul[i][j] = (mul[i][j]+(a[i][k]*b[k][j])%m)%m;
		        }
		    }
		    for (int i=0; i<n; i++)
		        for (int j=0; j<n; j++)
		            a[i][j] =mul[i][j];
		}

}

import java.util.Scanner;

public class task851b {

    void run() {
        Scanner sc = new Scanner(System.in);
        long ax = sc.nextInt();
        long ay = sc.nextInt();
        long bx = sc.nextInt();
        long by = sc.nextInt();
        long cx = sc.nextInt();
        long cy = sc.nextInt();
        long ab = (bx - ax) * (bx - ax) + (by - ay) * (by - ay);
        long bc = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);

        if (ab == bc || (by - ay) * (bx - ax) == (cy - ay) * (cx - ax)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static void main(String[] args) {
        new task851b().run();
    }

}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Main {

	static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[256]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

	static long power(long a,long k)
	{
		long m = 1000000007;
	    long ans=1;
	    long tmp=a%m;
	    while(k>0)
	    {
	        if(k%2==1)
	        	ans=ans*tmp%m;
	        tmp=tmp*tmp%m;
	        k>>=1;
	    }
	    return ans;
	}

	public static void main(String args[])throws IOException{
		Reader in = new Reader();
		Scanner sc = new Scanner(System.in);
		/*int n = in.nextInt();
		int[][] p = new int[n][5];
		for(int i=0;i<n;i++){
			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();
			int d = in.nextInt();
			int e = in.nextInt();
			p[0][0]=a;
			p[0][1]=b;
			p[0][2]=c;
			p[0][3]=d;
			p[0][4]=e;
		}
		int s[][][] = new int[n][n][5];
		int m[][] = new int[n][n];
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				if(i==j)
					continue;
				s[i][j][0]=p[i][0]+p[j][0];
				s[i][j][1]=p[i][1]+p[j][1];
				s[i][j][2]=p[i][2]+p[j][2];
				s[i][j][3]=p[i][3]+p[j][3];
				s[i][j][4]=p[i][4]+p[j][4];
				m[i][j]=p[i][0]*p[j][0]+p[i][1]*p[j][1]+p[i][2]*p[j][2]+p[i][3]*p[j][3]+p[i][4]*p[j][4];
			}
		}
		for(int i=0;i<n;i++){

		}*/

		double ax = in.nextDouble();
		double ay = in.nextDouble();
		double bx = in.nextDouble();
		double by = in.nextDouble();
		double cx = in.nextDouble();
		double cy = in.nextDouble();
		if((by-ay)*(cx-bx)==(cy-by)*(bx-ax)){
			System.out.println("No");
			System.exit(0);
		}
		double midx=(double)(cx+ax)/2.0;
		double midy=(double)(cy+ay)/2.0;
		if((midy-by)*(ay-cy)+(midx-bx)*(ax-cx)==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

	static int mod=1000000007;
}
//0 1 0 -1 0 0
//0 1 0 -1 1 0
//

import java.util.Scanner;
import java.util.Arrays;
import java.lang.Math;
public class ArpaGeometry {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        String inp = kbd.nextLine();
        String[] input = inp.split(" ");
        int inpAx = Integer.parseInt(input[0]) * 2;
        int inpAy = Integer.parseInt(input[1]) * 2;
        int inpBx = Integer.parseInt(input[2]) * 2;
        int inpBy = Integer.parseInt(input[3]) * 2;
        int inpCx = Integer.parseInt(input[4]) * 2;
        int inpCy = Integer.parseInt(input[5]) * 2;

        int n = (Math.abs(inpAx - inpBx) * Math.abs(inpAx - inpBx)) + (Math.abs(inpAy - inpBy) * Math.abs(inpAy - inpBy));
        int m = (Math.abs(inpBx - inpCx) * Math.abs(inpBx - inpCx)) + (Math.abs(inpBy - inpCy) * Math.abs(inpBy - inpCy));
        int i = (inpAx + inpCx) / 2;
        int j = (inpAy + inpCy) / 2;

        if(n == m && (i != inpBx || j != inpBy)){
        	System.out.println("YES");
        }else{
        	System.out.println("NO");
        }
    }
}

import java.util.*;

public class Test {
	public static void main(String[] args) {
	    Scanner in = new Scanner(System.in);
	    String input = in.nextLine();
		String[] strs = input.trim().split(" ");
		int[] ins = new int[strs.length];

		for (int i = 0; i < strs.length; i++) {
			ins[i] = Integer.parseInt(strs[i]);
		}

		if((ins[0] == ins[1]) && (ins[2] == ins[3]) && (ins[4] == ins[5])) {
			System.out.print("No");
		}
		else if((ins[0] == ins[2]) && (ins[2] == ins[4])) {
			System.out.print("No");
		}
		else if((ins[1] == ins[3]) && (ins[3] == ins[5])) {
			System.out.print("No");
		}
		else if(Math.hypot(ins[0] - ins[2], ins[1] - ins[3]) != Math.hypot(ins[2] - ins[4], ins[3] - ins[5])) {
			System.out.print("No");
		}
		else if((Math.hypot(ins[0] - ins[2], ins[1] - ins[3]) + Math.hypot(ins[2] - ins[4], ins[3] - ins[5])) == Math.hypot(ins[0] - ins[4], ins[1] - ins[5])) {
			System.out.print("No");
		}
		else {
			System.out.print("Yes");
		}
	}
}

import java.util.Collections;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Arrays;

public class Main {
  public static Scanner scanner = new Scanner(System.in);

  public static double distance(int ax, int ay, int bx, int by) {
	return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay,2));
  }

  public static double slope(int ax, int ay, int bx, int by) {
    double top = by - ay;
    double down = bx - ax;
    return top/down;
  }

  public static void main(String[] args) {

    int ax, ay, bx, by, cx, cy;
    while(scanner.hasNext()) {
      ax = scanner.nextInt();
      ay = scanner.nextInt();
      bx = scanner.nextInt();
      by = scanner.nextInt();
      cx = scanner.nextInt();
      cy = scanner.nextInt();
     if(distance(ax, ay, bx, by) == distance(bx, by, cx, cy))
     {
       if(slope(ax, ay, bx, by) == slope(bx, by, cx, cy)) System.out.println("NO");
       else System.out.println("YES");
     } else System.out.println("NO");
    }
  }
}

import java.util.Scanner;

/**
 * Created by Pranav ps on 04-09-2017.
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int ax = sc.nextInt();
        int ay = sc.nextInt();
        int bx = sc.nextInt();
        int by = sc.nextInt();
        int cx = sc.nextInt();
        int cy = sc.nextInt();
        boolean ans = ((cy-by)*(bx-ax) != (by-ay)*(cx-bx)) && ((cy-by)*(cy-by) + (cx-bx)*(cx-bx) == (by-ay)*(by-ay) + (bx-ax)*(bx-ax));
        if(!ans)
            System.out.println("No");
        else
            System.out.println("Yes");
    }
}