# Original solution
# AGC032C

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))


def hoge():
    from collections import defaultdict
    n, m = list(map(int, input().split()))

    ns = defaultdict(set)
    used = {}
    for _ in range(m):
        u,v = list(map(int, input().split()))
        ns[u-1].add(v-1)
        ns[v-1].add(u-1)
        used[u-1,v-1] = False
        used[v-1,u-1] = False


    seen = [False] * n
    prev = [None] * n
    cs = []
    count = 0
    done = True
    if not all(len(item)%2==0 and len(item)>0 for item in list(ns.values())):
        print("No")
        return


    for start in range(n):
        if seen[start]:
            continue
        q = [start]
        current_seen = [False] * n
        update = False
        while q:
    #         print(q)
            u = q.pop()
            current_seen[u] = True
            for v in ns[u]:
                if used[u,v] or prev[u]==v:
                    continue
                prev[v] = u
                if current_seen[v]:
                    # サイクル検出
                    count += 1
                    c = set()
                    tmp = v
                    while tmp not in c:
                        c.add(tmp)
                        used[tmp, prev[tmp]] = used[prev[tmp], tmp] = True
                        tmp = prev[tmp]
                    cs.append(c)
                    for u in c:
                        seen[u] = True
                    update = True
                    break
                q.append(v)
            if update:
                break
        if not update:
            print("No")
            done = False
            break

    def sub(cs):
        if len(cs)==1:
            return "No"
        elif len(cs)==2:
            if len(set(cs[0] & cs[1]))>=3:
                return "Yes"
            else:
                return "No"
        else :
            return "Yes"
    #     u2s = defaultdict(set)
    #     nns = defaultdict(set) # i番目のサイクルと重なるサイクル
    #     for i,s in enumerate(cs):
    #         for u in s:
    #             nns[i] |= u2s[u]
    #             u2s[u].add(i)
    #     for i,s in nns.items():
    #         for j in s:
    #             nns[j].add(i)
    #     count = 0
    # #     print(u2s)
    # #     print(nns)
    #     seen = [False] * len(cs)
    #     for start in range(len(cs)):
    #         if seen[start]:
    #             continue
    #         q = [start]
    #         seen[start] = True
    #         while q:
    #             u = q.pop()
    #             for v in nns[u]:
    #                 if not seen[v]:
    #                     q.append(v)
    #                     seen[v] = True
    #         count += 1
    #     if count<=3:
    #         return "Yes"
    #     else:
    #         return "No"
    if done:
        print((sub(cs)))
    #     print("Yes")
hoge()

# Optimized solution
# AGC032C

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))

def hoge():
    from collections import defaultdict
    n, m = list(map(int, input().split()))

    ns = defaultdict(set)
    used = {}
    for _ in range(m):
        u,v = list(map(int, input().split()))
        ns[u-1].add(v-1)
        ns[v-1].add(u-1)
        used[u-1,v-1] = False
        used[v-1,u-1] = False


    seen = [False] * n
    prev = [None] * n
    cs = []
    count = 0
    done = True
    
#     if not all(len(item)%2==0 and len(item)>0 for item in ns.values()):
#         print("No")
#         return


    for start in range(n):
        if seen[start]:
            continue
        q = [start]
        current_seen = [False] * n
        update = False
        while q:
            u = q.pop()
            current_seen[u] = True
            for v in ns[u]:
                if used[u,v] or prev[u]==v:
                    continue
                prev[v] = u
                if current_seen[v]:
                    # サイクル検出
                    count += 1
                    c = set()
                    tmp = v
                    while tmp not in c:
                        c.add(tmp)
                        used[tmp, prev[tmp]] = used[prev[tmp], tmp] = True
                        tmp = prev[tmp]
                    cs.append(c)
                    for u in c:
                        seen[u] = True
                    update = True
                    break
                q.append(v)
            if update:
                break
        if not update:
            print("No")
            return 
    if sum(seen)<n:
        print("No")
        return
    def sub(cs):
        if len(cs)==1:
            return "No"
        elif len(cs)==2:
            if len(set(cs[0] & cs[1]))>=3:
                return "Yes"
            else:
                return "No"
        else :
            return "Yes"
    #     u2s = defaultdict(set)
    #     nns = defaultdict(set) # i番目のサイクルと重なるサイクル
    #     for i,s in enumerate(cs):
    #         for u in s:
    #             nns[i] |= u2s[u]
    #             u2s[u].add(i)
    #     for i,s in nns.items():
    #         for j in s:
    #             nns[j].add(i)
    #     count = 0
    # #     print(u2s)
    # #     print(nns)
    #     seen = [False] * len(cs)
    #     for start in range(len(cs)):
    #         if seen[start]:
    #             continue
    #         q = [start]
    #         seen[start] = True
    #         while q:
    #             u = q.pop()
    #             for v in nns[u]:
    #                 if not seen[v]:
    #                     q.append(v)
    #                     seen[v] = True
    #         count += 1
    #     if count<=3:
    #         return "Yes"
    #     else:
    #         return "No"
    if done:
        print((sub(cs)))
    #     print("Yes")
hoge()