import sys

sys.setrecursionlimit(1 << 25)

read = sys.stdin.readline





def read_ints():

    return list(map(int, read().split()))





def read_a_int():

    return int(read())





def read_tuple(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(tuple(map(int, read().split())))

    return ret





def read_col(H, n_cols):

    '''

    H is number of rows

    n_cols is number of cols

    A列、B列が与えられるようなとき

    '''

    ret = [[] for _ in range(n_cols)]

    for _ in range(H):

        tmp = list(map(int, read().split()))

        for col in range(n_cols):

            ret[col].append(tmp[col])

    return ret





def read_matrix(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(list(map(int, read().split())))

    return ret

    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため





def read_map(H):

    '''

    H is number of rows

    文字列で与えられた盤面を読み取る用

    '''

    return [read()[:-1] for _ in range(H)]





def read_map_as_int(H):

    '''

    #→1,.→0として読み込む

    '''

    ret = []

    for _ in range(H):

        ret.append([1 if s == '#' else 0 for s in read()[:-1]])

        # 内包表記はpypyでは若干遅いことに注意

        # #numpy使うだろうからこれを残しておくけど

    return ret





MOD = 10**9 + 7

# default import

from collections import defaultdict, Counter, deque

from operator import itemgetter

from itertools import product, permutations, combinations

from bisect import bisect_left, bisect_right  # , insort_left, insort_right



S = eval(input())



if S[2] == S[3] and S[4] == S[5]:

    print('Yes')

else:

    print('No')

import sys

sys.setrecursionlimit(1 << 25)

read = sys.stdin.readline

ra = range

enu = enumerate





def read_ints():

    return list(map(int, read().split()))





def read_a_int():

    return int(read())





def read_tuple(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(tuple(map(int, read().split())))

    return ret





def read_col(H):

    '''

    H is number of rows

    A列、B列が与えられるようなとき

    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合

    '''

    ret = []

    for _ in range(H):

        ret.append(list(map(int, read().split())))

    return tuple(map(list, list(zip(*ret))))





def read_matrix(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(list(map(int, read().split())))

    return ret

    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため





MOD = 10**9 + 7

INF = 2**31  # 2147483648 > 10**9

# default import

from collections import defaultdict, Counter, deque

from operator import itemgetter

from itertools import product, permutations, combinations

from bisect import bisect_left, bisect_right  # , insort_left, insort_right

# https://atcoder.jp/contests/abc160/tasks/abc160_a



S = eval(input())

print(('Yes' if S[2] == S[3] and S[4] == S[5] else 'No'))

import sys

sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    """
    H is number of rows
    n_cols is number of cols
    A列、B列が与えられるようなとき
    """
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])
    return ret


def read_matrix(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


def read_map(H):
    """
    H is number of rows
    文字列で与えられた盤面を読み取る用
    """
    return [read()[:-1] for _ in range(H)]


def read_map_as_int(H):
    """
    #→1,.→0として読み込む
    """
    ret = []
    for _ in range(H):
        ret.append([1 if s == "#" else 0 for s in read()[:-1]])
        # 内包表記はpypyでは若干遅いことに注意
        # #numpy使うだろうからこれを残しておくけど
    return ret


MOD = 10**9 + 7
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right

S = eval(input())
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

import sys

sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    """
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    """
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, list(zip(*ret))))


def read_matrix(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right

# https://atcoder.jp/contests/abc160/tasks/abc160_a
S = eval(input())
print(("Yes" if S[2] == S[3] and S[4] == S[5] else "No"))

+ra = range +enu = enumerate -def read_col(H, n_cols): +def read_col(H): -    n_cols is number of cols +    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合 -    ret = [[] for _ in range(n_cols)] +    ret = [] -        tmp = list(map(int, read().split())) -        for col in range(n_cols): -            ret[col].append(tmp[col]) -    return ret +        ret.append(list(map(int, read().split()))) +    return tuple(map(list, list(zip(*ret)))) -def read_map(H): -    """ -    H is number of rows -    文字列で与えられた盤面を読み取る用 -    """ -    return [read()[:-1] for _ in range(H)] - - -def read_map_as_int(H): -    """ -    #→1,.→0として読み込む -    """ -    ret = [] -    for _ in range(H): -        ret.append([1 if s == "#" else 0 for s in read()[:-1]]) -        # 内包表記はpypyでは若干遅いことに注意 -        # #numpy使うだろうからこれを残しておくけど -    return ret - - +INF = 2**31  # 2147483648 > 10**9 +# https://atcoder.jp/contests/abc160/tasks/abc160_a -if S[2] == S[3] and S[4] == S[5]: -    print("Yes") -else: -    print("No") +print(("Yes" if S[2] == S[3] and S[4] == S[5] else "No"))