#include<stdio.h>
int main(){
  int n,i;
  scanf("%d",&n);
  int a[n],b[n],c[n];
  for(i=0;i<n;i++){
    scanf("%d %d %d",&a[i],&b[i],&c[i]);
  }
  for(i=0;i<n;i++){
    if(a[i]==b[i]){
      if(b[i]==c[i]){
	printf("YES\n");
      }
    }else{
      printf("NO\n");
    }
  }
  return(0);
}