import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
//int[] date=new int[2];
public class  Main {
int i,o,sum,h,s,e,u,ty,yu,ui,n,num,qw;
double m,t,r,j,k,f,d,g,w;
static double l;
String b,c,z,x,v,a,q;
Scanner scan =new Scanner(System.in);
//入力
	public void input() {	
	
	}
	//演算
	public void compute() {
	
		}
//出力
public void output() {
b=scan.next();
String[] names=b.split("");
//for(h=0;h<7;h++) {
//System.out.println(names[h]);
//}
if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
	public static void main(String [ ] args) {
		 Main p = new  Main ();
		p.input();
		p.compute();
		p.output();
		}
	} import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class  Main {
int i,o,sum,h,s,e,u,ty,yu,ui,n,num,qw;
double m,t,r,j,k,f,d,g,w;
static double l;
String b,c,z,x,v,a,q;
Scanner scan =new Scanner(System.in);
//入力
	public void input() {	
	
	}
	//演算
	public void compute() {
	
		}
//出力
public void output() {
b=scan.next();
String[] names=b.split("");
//for(h=0;h<7;h++) {
//System.out.println(names[h]);
//}
if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
	public static void main(String [ ] args) {
		 Main p = new  Main ();
		p.input();
		p.compute();
		p.output();
		}
	} Main int i i o o sum sum h h s s e e u u ty ty yu yu ui ui n n num num qw; qw double m m t t r r j j k k f f d d g g w; w static double l; l String b b c c z z x x v v a a q; q Scanner scan =new Scanner(System.in); scan new Scanner(System.in) //入力
	public void input() {	
	
	} input {	
	
	} //演算
	public void compute() {
	
		} compute {
	
		} //出力
public void output() {
b=scan.next();
String[] names=b.split("");
//for(h=0;h<7;h++) {
//System.out.println(names[h]);
//}
if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
} output {
b=scan.next();
String[] names=b.split("");
//for(h=0;h<7;h++) {
//System.out.println(names[h]);
//}
if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
} b=scan.next() b scan.next() scan.next scan String[] names=b.split(""); names b.split("") b.split b "" if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
} names[3].equals(names[4])&&names[5].equals(names[6]) names[3].equals(names[4]) names[3].equals names[3] names 3 names[4] names 4 names[5].equals(names[6]) names[5].equals names[5] names 5 names[6] names 6 {
	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" public static void main(String [ ] args) {
		 Main p = new  Main ();
		p.input();
		p.compute();
		p.output();
		} main {
		 Main p = new  Main ();
		p.input();
		p.compute();
		p.output();
		} Main p = new  Main (); p new  Main () p.input() p.input p p.compute() p.compute p p.output() p.output p String [ ] args args public class  Main {
int i,o,sum,h,s,e,u,ty,yu,ui,n,num,qw;
double m,t,r,j,k,f,d,g,w;
static double l;
String b,c,z,x,v,a,q;
Scanner scan =new Scanner(System.in);
//入力
	public void input() {	
	
	}
	//演算
	public void compute() {
	
		}
//出力
public void output() {
b=scan.next();
String[] names=b.split("");
//for(h=0;h<7;h++) {
//System.out.println(names[h]);
//}
if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
	public static void main(String [ ] args) {
		 Main p = new  Main ();
		p.input();
		p.compute();
		p.output();
		}
	} public class  Main {
int i,o,sum,h,s,e,u,ty,yu,ui,n,num,qw;
double m,t,r,j,k,f,d,g,w;
static double l;
String b,c,z,x,v,a,q;
Scanner scan =new Scanner(System.in);
//入力
	public void input() {	
	
	}
	//演算
	public void compute() {
	
		}
//出力
public void output() {
b=scan.next();
String[] names=b.split("");
//for(h=0;h<7;h++) {
//System.out.println(names[h]);
//}
if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
	public static void main(String [ ] args) {
		 Main p = new  Main ();
		p.input();
		p.compute();
		p.output();
		}
	} Main
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
//int[] date=new int[2];
public class  Main {
int i,o,sum,h,s,e,u,ty,yu,ui,n,num,qw;
double m,t,r,j,k,f,d,g,w;
static double l;
String b,c,z,x,v,a,q;
Scanner scan =new Scanner(System.in);
//入力
	public void input() {	
	
	}
	//演算
	public void compute() {
	
		}
//出力
public void output() {
b=scan.next();
String[] names=b.split("");
//for(h=0;h<7;h++) {
//System.out.println(names[h]);
//}
if(names[3].equals(names[4])&&names[5].equals(names[6])) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
	public static void main(String [ ] args) {
		 Main p = new  Main ();
		p.input();
		p.compute();
		p.output();
		}
	}