#define _CRT_SECURE_NO_WARNINGS #define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING #include using namespace std; int a[300020][2]; multiset S; int main() { int n, m; scanf("%d%d", &n, &m); for (int i = 0, x, y; i < m; i++) scanf("%d%d", &a[i][0], &a[i][1]); for (int i = 0; i < m; i++) S.insert(a[i][0]), S.insert(a[i][1]); for (int i = 1; i <= n; i++) if (S.count(i) == 0) return puts("No"), 0; for (int i = 0; i < m; i++) if (S.count(a[i][0]) > 1 && S.count(a[i][1]) > 1) return puts("No"), 0; puts("Yes"); return 0; }