import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

String input = sc.next();

String letter3 = input.substring(2, 3);
String letter4 =  input.substring(3, 4);
String letter5 = input.substring(4, 5);
String letter6 =  input.substring(5, 6);

if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

String input = sc.next();

String letter3 = input.substring(2, 3);
String letter4 =  input.substring(3, 4);
String letter5 = input.substring(4, 5);
String letter6 =  input.substring(5, 6);

if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
} Main public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

String input = sc.next();

String letter3 = input.substring(2, 3);
String letter4 =  input.substring(3, 4);
String letter5 = input.substring(4, 5);
String letter6 =  input.substring(5, 6);

if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
} main {
Scanner sc = new Scanner(System.in);

String input = sc.next();

String letter3 = input.substring(2, 3);
String letter4 =  input.substring(3, 4);
String letter5 = input.substring(4, 5);
String letter6 =  input.substring(5, 6);

if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc String letter3 = input.substring(2, 3); letter3 input.substring(2, 3) input.substring input 2 3 String letter4 =  input.substring(3, 4); letter4 input.substring(3, 4) input.substring input 3 4 String letter5 = input.substring(4, 5); letter5 input.substring(4, 5) input.substring input 4 5 String letter6 =  input.substring(5, 6); letter6 input.substring(5, 6) input.substring input 5 6 if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
} letter3.equals(letter4) && letter5.equals(letter6) letter3.equals(letter4) letter3.equals letter3 letter4 letter5.equals(letter6) letter5.equals letter5 letter6 {
	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 public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

String input = sc.next();

String letter3 = input.substring(2, 3);
String letter4 =  input.substring(3, 4);
String letter5 = input.substring(4, 5);
String letter6 =  input.substring(5, 6);

if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
} public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

String input = sc.next();

String letter3 = input.substring(2, 3);
String letter4 =  input.substring(3, 4);
String letter5 = input.substring(4, 5);
String letter6 =  input.substring(5, 6);

if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
} Main
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

String input = sc.next();

String letter3 = input.substring(2, 3);
String letter4 =  input.substring(3, 4);
String letter5 = input.substring(4, 5);
String letter6 =  input.substring(5, 6);

if(letter3.equals(letter4) && letter5.equals(letter6)) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
}
