import java.util.*;
public class Main {
    static final long MODVAL = 998244353L;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
//        System.out.println(S.charAt(3));
        boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5));
        System.out.println(flag ? "Yes" : "No");
    }
} import java.util.*; util.* java public class Main {
    static final long MODVAL = 998244353L;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
//        System.out.println(S.charAt(3));
        boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5));
        System.out.println(flag ? "Yes" : "No");
    }
} Main static final long MODVAL = 998244353L; MODVAL 998244353L public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
//        System.out.println(S.charAt(3));
        boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5));
        System.out.println(flag ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
//        System.out.println(S.charAt(3));
        boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5));
        System.out.println(flag ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5)); flag (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5)) (S.charAt(2) == S.charAt(3)) S.charAt(2) S.charAt S 2 S.charAt(3) S.charAt S 3 (S.charAt(4) == S.charAt(5)) S.charAt(4) S.charAt S 4 S.charAt(5) S.charAt S 5 System.out.println(flag ? "Yes" : "No") System.out.println System.out System System.out flag ? "Yes" : "No" flag "Yes" "No" String[] args args public class Main {
    static final long MODVAL = 998244353L;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
//        System.out.println(S.charAt(3));
        boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5));
        System.out.println(flag ? "Yes" : "No");
    }
} public class Main {
    static final long MODVAL = 998244353L;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
//        System.out.println(S.charAt(3));
        boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5));
        System.out.println(flag ? "Yes" : "No");
    }
} Main
import java.util.*;
public class Main {
    static final long MODVAL = 998244353L;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
//        System.out.println(S.charAt(3));
        boolean flag = (S.charAt(2) == S.charAt(3)) && (S.charAt(4) == S.charAt(5));
        System.out.println(flag ? "Yes" : "No");
    }
}
