import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        char[] ch = sc.next().toCharArray();
        pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No");
        pw.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        char[] ch = sc.next().toCharArray();
        pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No");
        pw.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        char[] ch = sc.next().toCharArray();
        pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No");
        pw.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        char[] ch = sc.next().toCharArray();
        pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No");
        pw.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) char[] ch = sc.next().toCharArray(); ch sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No") pw.println pw ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No" ch[2]==ch[3] && ch[4]==ch[5] ch[2]==ch[3] ch[2] ch 2 ch[3] ch 3 ch[4]==ch[5] ch[4] ch 4 ch[5] ch 5 "Yes" "No" pw.flush() pw.flush pw String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        char[] ch = sc.next().toCharArray();
        pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No");
        pw.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        char[] ch = sc.next().toCharArray();
        pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No");
        pw.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        char[] ch = sc.next().toCharArray();
        pw.println(ch[2]==ch[3] && ch[4]==ch[5] ? "Yes" : "No");
        pw.flush();
    }
}