#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define rep(i, N) for(int i =0;i < N;i++)
 
int N, M;
int main(){
  srand((unsigned int) time(NULL));
  scanf("%d %d", &N, &M);
	rep(i, M) {
      int r,l,d;
      scanf("%d %d %d", &r, &l, &d);
	}
  printf("%s\n", (rand() % 2) ? "Yes" : "No");
  return 0;