import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Coffee coffee = new Coffee();
        coffee.solve(sc);
    }

    static class Coffee {
        public void solve(Scanner sc) {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        }
    }
} 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);
        Coffee coffee = new Coffee();
        coffee.solve(sc);
    }

    static class Coffee {
        public void solve(Scanner sc) {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Coffee coffee = new Coffee();
        coffee.solve(sc);
    } main {
        Scanner sc = new Scanner(System.in);
        Coffee coffee = new Coffee();
        coffee.solve(sc);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Coffee coffee = new Coffee(); coffee new Coffee() coffee.solve(sc) coffee.solve coffee sc String[] args args static class Coffee {
        public void solve(Scanner sc) {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        }
    } Coffee public void solve(Scanner sc) {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        } solve {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        } String str = sc.next(); str sc.next() sc.next sc if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No"); str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5) str.charAt(2) == str.charAt(3) str.charAt(2) str.charAt str 2 str.charAt(3) str.charAt str 3 str.charAt(4) == str.charAt(5) str.charAt(4) str.charAt str 4 str.charAt(5) str.charAt str 5 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" Scanner sc sc public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Coffee coffee = new Coffee();
        coffee.solve(sc);
    }

    static class Coffee {
        public void solve(Scanner sc) {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Coffee coffee = new Coffee();
        coffee.solve(sc);
    }

    static class Coffee {
        public void solve(Scanner sc) {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        }
    }
} Main
import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Coffee coffee = new Coffee();
        coffee.solve(sc);
    }

    static class Coffee {
        public void solve(Scanner sc) {
            String str = sc.next();
            if (str.charAt(2) == str.charAt(3) && str.charAt(4) == str.charAt(5)) System.out.println("Yes");
            else System.out.println("No");
        }
    }
}
