import java.util.Scanner;
 
public class Main {
 
	static final boolean debugMode = false;
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
 
	static int readInt(Scanner sc) {
		return Integer.parseInt(sc.next());
	}
 
	static void log(String s) {
		if (debugMode) {
			System.out.println(s);
		}
		return;
	}
}
 
class Pair {
	private int x;
	private int y;
 
	public int getX() {
		return x;
	}
 
	public void setX(int x) {
		this.x = x;
	}
 
	public int getY() {
		return y;
	}
 
	public void setY(int y) {
		this.y = y;
	}
 
	public Pair() {
 
	}
 
	public Pair(int x, int y) {
		this.x = x;
		this.y = y;
	}
 
} import java.util.Scanner; Scanner java.util public class Main {
 
	static final boolean debugMode = false;
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
 
	static int readInt(Scanner sc) {
		return Integer.parseInt(sc.next());
	}
 
	static void log(String s) {
		if (debugMode) {
			System.out.println(s);
		}
		return;
	}
} Main static final boolean debugMode = false; debugMode false public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} 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("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args static int readInt(Scanner sc) {
		return Integer.parseInt(sc.next());
	} readInt {
		return Integer.parseInt(sc.next());
	} return Integer.parseInt(sc.next()); Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Scanner sc sc static void log(String s) {
		if (debugMode) {
			System.out.println(s);
		}
		return;
	} log {
		if (debugMode) {
			System.out.println(s);
		}
		return;
	} if (debugMode) {
			System.out.println(s);
		} debugMode {
			System.out.println(s);
		} System.out.println(s) System.out.println System.out System System.out s return; String s s class Pair {
	private int x;
	private int y;
 
	public int getX() {
		return x;
	}
 
	public void setX(int x) {
		this.x = x;
	}
 
	public int getY() {
		return y;
	}
 
	public void setY(int y) {
		this.y = y;
	}
 
	public Pair() {
 
	}
 
	public Pair(int x, int y) {
		this.x = x;
		this.y = y;
	}
 
} Pair private int x; x private int y; y public int getX() {
		return x;
	} getX {
		return x;
	} return x; x public void setX(int x) {
		this.x = x;
	} setX {
		this.x = x;
	} this.x = x this.x this this.x x int x x public int getY() {
		return y;
	} getY {
		return y;
	} return y; y public void setY(int y) {
		this.y = y;
	} setY {
		this.y = y;
	} this.y = y this.y this this.y y int y y public Pair() {
 
	} Pair {
 
	} public Pair(int x, int y) {
		this.x = x;
		this.y = y;
	} Pair {
		this.x = x;
		this.y = y;
	} this.x = x this.x this this.x x this.y = y this.y this this.y y int x x int y y public class Main {
 
	static final boolean debugMode = false;
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
 
	static int readInt(Scanner sc) {
		return Integer.parseInt(sc.next());
	}
 
	static void log(String s) {
		if (debugMode) {
			System.out.println(s);
		}
		return;
	}
} public class Main {
 
	static final boolean debugMode = false;
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
 
	static int readInt(Scanner sc) {
		return Integer.parseInt(sc.next());
	}
 
	static void log(String s) {
		if (debugMode) {
			System.out.println(s);
		}
		return;
	}
} Main
import java.util.Scanner;
 
public class Main {
 
	static final boolean debugMode = false;
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
 
	static int readInt(Scanner sc) {
		return Integer.parseInt(sc.next());
	}
 
	static void log(String s) {
		if (debugMode) {
			System.out.println(s);
		}
		return;
	}
}
 
class Pair {
	private int x;
	private int y;
 
	public int getX() {
		return x;
	}
 
	public void setX(int x) {
		this.x = x;
	}
 
	public int getY() {
		return y;
	}
 
	public void setY(int y) {
		this.y = y;
	}
 
	public Pair() {
 
	}
 
	public Pair(int x, int y) {
		this.x = x;
		this.y = y;
	}
 
}