import java.awt.Point; import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class hackerrrrara{ public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int q = sc.nextInt(); for (int i=0; i< q; i++){ int n = sc.nextInt(); ArrayList list = new ArrayList(); for(int j=0; j< n; j++){ int x = sc.nextInt(); int y = sc.nextInt(); Point xy = new Point(x,y); list.add(xy); } if (check(list)){ System.out.println("YES"); } else{ System.out.println("NO"); } } } public static boolean check( ArrayList list){ for(int i=0; i< list.size()-3; i++){ Point A = list.get(i); Point B = list.get(i+1); Point C = list.get(i+2); int a1=(int)A.getX(); int a2=(int)A.getY(); int b1=(int)B.getX(); int b2=(int)B.getY(); int c1=(int)C.getX(); int c2=(int)C.getY(); if( (b1-a1)*(c1-b1)+(b2-a2)*(c2-b2)!=0 ){ return false; } } return true; } }