Problem:
Score : 100 points

Problem Statement

A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.

Given a string S, determine whether it is coffee-like.

Constraints

S is a string of length 6 consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If S is coffee-like, print Yes; otherwise, print No.

Sample Input 1

sippuu

Sample Output 1

Yes

In sippuu, the 3-rd and 4-th characters are equal, and the 5-th and 6-th characters are also equal.

Sample Input 2

iphone

Sample Output 2

No

Sample Input 3

coffee

Sample Output 3

Yes

Solution in Go (1.6) (judge verdict: Runtime Error)

/*
 * Golangの練習
 *
 */

package main

import (
	"fmt"
	"strings"
	"bufio"
	"os"
	"strconv"
)

var rdr = bufio.NewReaderSize(os.Stdin, 10000000000)

func readLine() string {
    buf := make([]byte, 0, 10000000000)
    for {
        l, p, e := rdr.ReadLine()
        if e != nil {
            panic(e)
        }
        buf = append(buf, l...)
        if !p {
            break
        }
    }
    return string(buf)
}

func main(){
	var splitedLine []string

	// 1行目
	splitedLine = strings.Split(readLine(), " ")
	k, _ := strconv.Atoi(splitedLine[0])
	n, _ := strconv.Atoi(splitedLine[1])
	
	// 2行目
	var a = make([]int, n+1)
	splitedLine = strings.Split(readLine(), " ")
	for i, s := range splitedLine {
		val, _ := strconv.Atoi(s)
		a[i] = val
	}
	a[n] = k+a[0]

	// NOTE: REの原因個所の特定
	maxCost := 0
	for i := 0; i < n; i++ {
		tmp := a[i+1] - a[i]
		if tmp > maxCost {
			maxCost = tmp
		}
	}
	fmt.Println(k - maxCost)
}