Scanner input = new Scanner (System.in);
		int A,B,C;
		A = input.nextInt();
		B = input.nextInt();
		C = input.nextInt();
	if ((A==5&&B==5&& C== 7)|| (A==5&&B==7&& C== 5) || (A==7&&B==5&& C== 5) )
 { System.out.println("YES");}
		else { System.out.println("NO");}

	}

}


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

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class AT042A {
    static BufferedReader __in;
    static PrintWriter __out;
    static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        __in = new BufferedReader(new InputStreamReader(System.in));
        __out = new PrintWriter(new OutputStreamWriter(System.out));

        int[] a = ria(3);
        sort(a);
        if(a[0] == 5 && a[1] == 5 && a[2] == 7) prY();
        else prN();

        close();
    }

    // references
    // IBIG = 1e9 + 7
    // IRAND ~= 3e8
    // IMAX ~= 2e10
    // LMAX ~= 9e18
    // constants
    static final int IBIG = 1000000007;
    static final int IRAND = 327859546;
    static final int IMAX = 2147483647;
    static final int IMIN = -2147483648;
    static final long LMAX = 9223372036854775807L;
    static final long LMIN = -9223372036854775808L;

    // util
    static int minof(int a, int b, int c) {
        return min(a, min(b, c));
    }

    static int minof(int... x) {
        return x.length == 1 ? x[0] : x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));
    }

    static int minstarting(int offset, int... x) {
        assert x.length > 2;
        return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));
    }

    static long minof(long a, long b, long c) {
        return min(a, min(b, c));
    }

    static long minof(long... x) {
        return x.length == 1 ? x[0] : x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));
    }

    static long minstarting(int offset, long... x) {
        assert x.length > 2;
        return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));
    }

    static int maxof(int a, int b, int c) {
        return max(a, max(b, c));
    }

    static int maxof(int... x) {
        return x.length == 1 ? x[0] : x.length == 2 ? max(x[0], x[1]) : max(x[0], maxstarting(1, x));
    }

    static int maxstarting(int offset, int... x) {
        assert x.length > 2;
        return offset == x.length - 2 ? max(x[offset], x[offset + 1]) : max(x[offset], maxstarting(offset + 1, x));
    }

    static long maxof(long a, long b, long c) {
        return max(a, max(b, c));
    }

    static long maxof(long... x) {
        return x.length == 1 ? x[0] : x.length == 2 ? max(x[0], x[1]) : max(x[0], maxstarting(1, x));
    }

    static long maxstarting(int offset, long... x) {
        assert x.length > 2;
        return offset == x.length - 2 ? max(x[offset], x[offset + 1]) : max(x[offset], maxstarting(offset + 1, x));
    }

    static int powi(int a, int b) {
        if (a == 0) return 0;
        int ans = 1;
        while (b > 0) {
            if ((b & 1) > 0) ans *= a;
            a *= a;
            b >>= 1;
        }
        return ans;
    }

    static long powl(long a, int b) {
        if (a == 0) return 0;
        long ans = 1;
        while (b > 0) {
            if ((b & 1) > 0) ans *= a;
            a *= a;
            b >>= 1;
        }
        return ans;
    }

    static int floori(double d) {
        return (int) d;
    }

    static int ceili(double d) {
        return (int) ceil(d);
    }

    static long floorl(double d) {
        return (long) d;
    }

    static long ceill(double d) {
        return (long) ceil(d);
    }

    // input
    static void r() throws IOException {
        input = new StringTokenizer(__in.readLine());
    }

    static int ri() throws IOException {
        return Integer.parseInt(__in.readLine());
    }

    static long rl() throws IOException {
        return Long.parseLong(__in.readLine());
    }

    static int[] ria(int n) throws IOException {
        int[] a = new int[n];
        input = new StringTokenizer(__in.readLine());
        for (int i = 0; i < n; ++i) a[i] = Integer.parseInt(input.nextToken());
        return a;
    }

    static long[] rla(int n) throws IOException {
        long[] a = new long[n];
        input = new StringTokenizer(__in.readLine());
        for (int i = 0; i < n; ++i) a[i] = Long.parseLong(input.nextToken());
        return a;
    }

    static char[] rcha() throws IOException {
        return __in.readLine().toCharArray();
    }

    static String rline() throws IOException {
        return __in.readLine();
    }

    static int rni() throws IOException {
        input = new StringTokenizer(__in.readLine());
        return Integer.parseInt(input.nextToken());
    }

    static int ni() {
        return Integer.parseInt(input.nextToken());
    }

    static long rnl() throws IOException {
        input = new StringTokenizer(__in.readLine());
        return Long.parseLong(input.nextToken());
    }

    static long nl() {
        return Long.parseLong(input.nextToken());
    }

    // output
    static void pr(int i) {
        __out.print(i);
    }

    static void prln(int i) {
        __out.println(i);
    }

    static void pr(long l) {
        __out.print(l);
    }

    static void prln(long l) {
        __out.println(l);
    }

    static void pr(double d) {
        __out.print(d);
    }

    static void prln(double d) {
        __out.println(d);
    }

    static void pr(char c) {
        __out.print(c);
    }

    static void prln(char c) {
        __out.println(c);
    }

    static void pr(char[] s) {
        __out.print(new String(s));
    }

    static void prln(char[] s) {
        __out.println(new String(s));
    }

    static void pr(String s) {
        __out.print(s);
    }

    static void prln(String s) {
        __out.println(s);
    }

    static void pr(Object o) {
        __out.print(o);
    }

    static void prln(Object o) {
        __out.println(o);
    }

    static void prln() {
        __out.println();
    }

    static void pryes() {
        __out.println("yes");
    }

    static void pry() {
        __out.println("Yes");
    }

    static void prY() {
        __out.println("YES");
    }

    static void prno() {
        __out.println("no");
    }

    static void prn() {
        __out.println("No");
    }

    static void prN() {
        __out.println("NO");
    }

    static void pryesno(boolean b) {
        __out.println(b ? "yes" : "no");
    }

    ;

    static void pryn(boolean b) {
        __out.println(b ? "Yes" : "No");
    }

    static void prYN(boolean b) {
        __out.println(b ? "YES" : "NO");
    }

    static void prln(int... a) {
        for (int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), ++i) ;
        __out.println(a[a.length - 1]);
    }

    static void prln(long... a) {
        for (int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), ++i) ;
        __out.println(a[a.length - 1]);
    }

    static <T> void prln(Collection<T> c) {
        int n = c.size() - 1;
        Iterator<T> iter = c.iterator();
        for (int i = 0; i < n; __out.print(iter.next()), __out.print(' '), ++i) ;
        __out.println(iter.next());
    }

    static void flush() {
        __out.flush();
    }

    static void close() {
        __out.close();
    }
}


pbulic boolean canMake575(String str){
	String[] strArray = str.split(" ");
	int countFive = 0;
	int countSeven = 0;
  	for (int i = 0; i < strArray.length, i++) {
		if (strArray.equals("5")) {
          	countFive++;
        } else if (strArray.equals("7")) {
          	countSeven++;
        }
    }

	if (countFive == 2 && countSeven == 1) {
    	return true;
    }
  	return false;
}


#include<stdio.h>
int main(void){
	int A,B,C;
	scanf("%d %d %d",&A,&B,&C);
	if (A == 7){
		if (B == C && B == 5){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	else if (B == 7){
		if (A == C && C == 5){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	else if (C == 7){
		if (B == A && A == 5){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}


#include<stdio.h>
#include<algorithm>
#include<string.h>
#include<string>
#include<math.h>
#include<stdlib.h>
#include<time.h>
#include<map>
#include<queue>
#include<set>
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
int f[20],x;
int main(){
	fo(i,1,3){
		scanf("%d",&x);
		f[x]++;
	}
	if (f[5]==2&&f[7]==1) printf("YES\n");else printf("NO\n");
	return 0;
}


#include<stdio.h>
int main()
{
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    if((a==5 && b==5 && c==7)||(a==5 && b==7 && c==5)||(a==7 && b==5 && c==5)){

          printf("YES\n");
    }

    else{
          printf("NO\n");
    }
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main(){
	int a[3];
  int x=0,y=0;
  for(int i=0;i<3;i++){
    if(a[i]==5)
      x++;
    else if(a[i]==7)
      y++;
  }
  if(x==2 && y==1){
    cout<<"YES\n";
  }
else{
  cout<<"NO\n";
}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main(){
	int a[3];
  int x=0,y=0;
  for(int i=0;i<3;i++){
    if(a[i]==5)
      x++;
    else
      y++;
  }
  if(x==2){
    cout<<"YES\n";
  }
else{
  cout<<"NO\n";
}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 1 + 1e5;
const ll mod = 1e9 + 7;

typedef pair<int,int> II;

int h, w, a, b, dp[maxn];
ll gt[2 * maxn + 100], igt[2 * maxn + 100];
ll ans;

ll C(int n, int k) {
	return ((gt[n] * igt[k]) % mod * igt[n - k]) % mod;
}

ll Pow (int i, int j) {
	if (j == 0) return 1;
	if (j % 2) {
		return (i * Pow (i, j - 1)) % mod;
	}
	ll val = Pow (i, j / 2);
  return (val * val) % mod;
}

void calc () {
	gt[0] = 1;
	for (int i = 1; i <= 2 * maxn; ++i) {
		gt[i] = (gt[i - 1] * i) % mod;
	}
	igt[2 * maxn] = Pow (gt[2 * maxn], mod - 2);
  for (int i = 2 * maxn - 1; i >= 0; --i) {
    igt[i] = (igt[i + 1] * (i + 1) + mod) % mod;
  }
}

int main()
{
	#ifndef ONLINE_JUDGE
	freopen("abc.inp","r",stdin);freopen("abc.out","w",stdout);
//	freopen("abc.inp","r",stdin);freopen("abc.out","w",stdout);
	#endif //ONLINE_JUDGE
	ios_base::sync_with_stdio(0);
	cin.tie();
	cout.tie();
	calc();

	cin >> h >> w >> a >> b;
	int _a = h - a, _b = w - b;
	for (int i = 0; i < _b; ++i)
		dp[i] = C(_a + b + i - 1, _a - 1);
	for (int i = 0; i < _b; ++i) {
		ans += (C (a + i - 1, i) * dp[_b - i - 1] ) % mod;
		ans %= mod;
//		cout << C (a + i - 1, i) << " " << dp[_b - i - 1] << '\n';
	}
	cout << ans;
   return 0;
}


#include<stdio.h>
#include<stdlib.h>
int main(){
       int five=0,seven=0,n;
       for(int i=0;i<3;i++){
              scanf("%d",&n);
              if(n==5) five++;
              if(n==7) seven++;
       }
       if(five==2&&seven==1) printf("YES");
       else printf("NO");
       return 0;
}


#include <stdio.h>

int main(void) {
	int a, b, c;
	scanf("%d", &a);
	scanf("%d", &b);
	scanf("%d", &c);

	if (a+b+c ==17) {
		if (a == 5) {
			if (b == 5 && c == 7 || b == 7 && c == 5) {
				printf("YES\n");
			} else {
				printf("NO\n");
			}
		} else if (a == 7) {
				if (b==5&&c==5) {
					printf("YES\n");
				} else {
					printf("NO\n");
				}
		}
	} else {
		printf("NO\n");
	}

	return 0;
}


#include <stdio.h>

int ok(int a, int b, int c) {
	return a == 5 && b == 7 && c == 5;
}

int main() {
	int a, b, c;

	scanf("%d%d%d", &a, &b, &c);
	printf("%s\n", ok(a, b, c) || ok(a, c, b) || ok(b, a, c) || ok(b, c, a) || ok(c, a, b) || ok(c, b, a) ? "YES" : "NO");
	return 0;
}


#include<stdio.h>

int main(void){
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  if((a == 5 && ((a == b && c == 7) || (a == c && b == 7))) || (b == 5 && b == c && a == 7)){
    printf("YES/n");
  }else{
    printf("NO/n");
  }
  return 0;
}


#include<stdio.h>
int main()
{
    int a,b,c
    while(scanf("%d%d%d",&a,&b,&c)==3)
    {
        if(a==5&&b==5&&c==7)
            printf("YES\n");
        else if(a==5&&b==7&&c==5)
            printf("YES\n");
        else if(a==7&&b==5&&c==5)
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}


#include<stdio.h>
int main(){
    int a[3],i,cnt=0,s=0;
    for(i=0;i<3;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<3;i++){
        if(a[i]==5){
            cnt++;
        }
        if(a[i]==7){
            s++;
        }
    }
    if(cnt==2 && s==1){
        printf("Yes\n");
    }
    else{
        printf("No\n");
    }
    return 0;
}


function main(input) {
    const nums = input.split(" ");
    var count5 = 0, count7 = 0;

    nums.forEach( num => {
        if(num == 5) {
            count5 += 1;
        }
        if(num == 7) {
            count7 += 1;
        }
    })
    console.log(count5 === 2 && count7 === 1 ? "YES" : "NO");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function Main(n) {
  console.log((n=="5 5 7"||n=="5 7 5"||n=="7 5 5")?"YES":"NO")
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


// inputに入力データ全体が入る
function Main(input) {
	input = input.split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = parseInt(input[0], 10);
	var b = parseInt(input[1], 10);
	var c = parseInt(input[2], 10);
    var total = a + b + c;
	//出力
  if (a > 4 && b > 4 && c > 4 && total === 17) {
	console.log('YES');
  }else {
	console.log('NO');
  }
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input) {
  input = input.trim();
  const a = input.split(' ').map(Number);
  console.log(a[0]*a[1]*a[2]==175?'Yes':'No');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
  input = input.trim();
  const [a,b,c] = input.split(" ").map(Number);
  console.log(a*b*c==175?'Yes':'No');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
  input = input.trim();
  const [a,b,c] = input.split(" ").map(Number);
  let set = new Set([a,b,c]);
  let num = set.size;
  if(num==2){
    if(a==5||a==7||b==5||b==7||c==5||c==7){
       console.log('Yes');
    }else{
       console.log('No');
    }
  }else{
    console.log('No');
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


package main

import "fmt"

func main() {
	slice := make([]int, 3)
	fmt.Scanf("%d %d %d", &slice[0], &slice[1], &slice[2])

	count5 := 0
	count7 := 0

	for i := 0; i < 3; i++ {
		if slice[i] == 5 {
			count5++
		} else if slice[i] == 7 {
			count7++
		}
	}

	if count5 == 2 && count7 == 1 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import "fmt"

func main(){
	var  i int;
  	var num5,num7 int;
  	num5 = 2;
  	num7 = 1;
  for a:=0;a<3;a++{
    fmt.Scan(&i);
    if(i==5){
    	num5--;
    }else if(i==7){
    	num7--;
    }else{
    	continue;
    }
  }
  if(num5==0 && num7==0){
    fmt.Println("YES")
  }else{
    fmt.Println("NO")
  }

}


package main

import "fmt"

func main() {
	var a, b, c int
	fmt.Scan(&a, &b, &c)

	if (a == 7 && b == 5 && c == 5) || (a == 5 && b == 7 && c == 5) || (a == 5 && b == 5 && c == 7) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}


package main

import (
	"fmt"
)

func main() {
	//3つの整数を受け取れるようにスライスを作る
	slice := make([]int, 3)

	//標準入力から空白区切りの数列を読み取り、スライスに代入する
	fmt.Scanln(&slice[0], &slice[1], &slice[2])

	//それぞれに値が入っていることを確認する
	//for i := 0; i < 3; i++ {
	//	fmt.Printf("%d\n", slice[i])
	//}

	//こちらの方法でも確認可能
	//fmt.Printf("%d", slice)

	//slice[0]が5のとき[5, ?, ?]
	if slice[0] == 5 {
		//slice[1]が5のとき[5, 5, ?]
		if slice[1] == 5 {
			//slice[2]が7のとき[5, 5, 7]
			if slice[2] == 7 {
				sayYes()
			}
		}
		//slice[1]が7のとき[5, 7, ?]
		if slice[1] == 7 {
			//slice[2]が5のとき[5, 7, 5]
			if slice[2] == 5 {
				sayYes()
			}
		}
		//slice[0]が7のとき[7, ?, ?]
	} else if slice[0] == 7 {
		//slice[1]とslice[2]が両方5のとき[7, 5, 5]
		if slice[1] == 5 && slice[2] == 5 {
			sayYes()
		}
	} else {
		sayNo()
	}
}

//あえて練習のために作った関数(ただ"YES"と出力するだけ)
func sayYes() {
	fmt.Println("YES")
}

//コンテストには必要ないけど、一応間違っているとわかるようにするために作成
func sayNo() {
	fmt.Println("NO")
}


package main

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

func main() {
	s := bufio.NewScanner(os.Stdin)
	s.Scan()
	text := s.Text()

	words := strings.Split(text, " ")

	var add int
	for _, v := range words {
		val, _ := strconv.Atoi(v)
		add += val
	}

	if add == 19 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}


package main

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

func main() {
	s := bufio.NewScanner(os.Stdin)
	s.Scan()
	text := s.Text()

	words := strings.Split(text, " ")

	var add int
	for _, v := range words {
		val, _ := strconv.Atoi(v)
		add += val
	}

	if add == 31 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}


puts"557"==gets.split.sort*""?:YES: :NO


arr = [5, 5, 7]
n = gets.chomp.split(" ").map(&:to_i)
n.sort!

if n == arr
  puts "YES"
else
  puts "NO"
end


array = Array.new(3)
array=gets
array=array.split(" ")
array=array.sort
if array[0]=="5"&&array[1]=="5"&&array[2]=="7" then
    puts "YES"
else
    puts "NO"
end


puts [5,5,5]==gets.split.map(&:to_i).sort ? "YES" : "NO"


word = gets.split
puts word


class A042
  def call(a, b, c)
    (a == 5 || a== 7) &&
        (b == 5 || b== 7) &&
        (c == 5 || c== 7) &&
        a + b + c == 17
  end

  def main
    inputs = gets.split(' ')
    puts call(inputs[0].to_i, inputs[1].to_i, inputs[2].to_i)
  end
end

A042.new.main


fn read_parameters<T>() -> Result<Vec<T>, String>
where
    T: std::str::FromStr,
{
    let mut line = String::new();
    std::io::stdin()
        .read_line(&mut line)
        .map_err(|err| format!("{:?}", err))?;

    let xs = line.trim().split_whitespace();
    let mut result = Vec::new();

    for x in xs {
        let ans = x.parse::<T>().map_err(|_| format!("{}", "parse error"))?;
        result.push(ans);
    }
    Ok(result)
}

fn main() {
    let mut a = read_parameters::<usize>().unwrap();
    a.sort();

    let mut sum = 0;
    for x in a {
        sum = 10 * sum + x;
    }

    if sum == 557 {
        println!("YES");
    } else {
        println!("NO");
    }
}


fn main() {
    let mut line = String::new();
    std::io::stdin().read_line(&mut line).unwrap();

    let sum: u8 = line
        .trim()
        .split(' ')
        .map(|s| s.parse::<u8>().unwrap())
        .sum();
    if sum == 17 {
        println!("YES");
    } else {
        println!("NO");
    }
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        a:usize,
        b:usize,
        c:usize,
    }
    let mut array:Vec<usize> = Vec::new();
    array.push(a);
    array.push(b);
    array.push(c);
    array.sort();
    if array[0] == 5 && array[1] == 5 && array[2] == 7{
        println!("YES");
    }else{
        println!("NO");
    }

}


use proconio::input;

// use std::cmp::*;
// use std::collections::*;
// use proconio::marker::Chars;

fn main() {
    input! {
        // s: String
        // n: isize
        abc: [i64;3]
    }
    abc.sort();
    if(abc[0]==5 && abc[1]==5 && abc[2]==7){
        println!("{}", "YES");
    }else{
        println!("{}", "NO");
    }

}


use std::io::Read;

fn main() {
    let mut buf = String::new();

    // 標準入力から全部bufに読み込む
    std::io::stdin().read_to_string(&mut buf).unwrap();

    // 読み込んだStringを空白で分解する
    let mut iter = buf.split_whitespace();
 	iter.next();

    let q: usize = iter.next().unwrap().parse().unwrap();
    let mut lrt: Vec<String> = (0..q)
        .map(|_| {
                String::from(iter.next().unwrap())
        }).collect();

      lrt.sort();

      let result = lrt.concat();

  	print!("{}", result);

}


use std::io::Read;

fn main() {
    let mut buf = String::new();

    // 標準入力から全部bufに読み込む
    std::io::stdin().read_to_string(&mut buf).unwrap();

    // 読み込んだStringを空白で分解する
    let mut iter = buf.split_whitespace();
 	iter.next();

    let q: usize = iter.next().unwrap().parse().unwrap();
    let mut lrt: Vec<String> = (0..q)
        .map(|_| {
                String::from(iter.next().unwrap())
        }).collect();

      lrt.sort();

      let result = lrt.concat();

  	println!("{}", result);

}


let i=readLine()!.characters.split(" ").map{Int(String($0))!}.sort();print(i==[5,5,7] ?"YES":"NO")


let i=readLine()!.characters.split(" ").map{Int(String($0))!}.sort();
print(i==[5,5,7] ?"YES":"NO")


import Foundation

let input_lines = readLine()?.characters.split{ $0==" " }

var count5 = 0
var count7 = 0
for str in input_lines! {
  if "5" == String(str) {
    count5 += 1
  }
  else if "7" == String(str) {
    count7 += 1
  }
}

print((count5 == 2 && count7 == 1) ? "YES" : "NO")


let input = readLine()!
var input_lines = input.split(separator: " ")

var five_count = 0
var seven_count = 0

input_lines.forEach { (input: Substring) in
    switch input {
    case "5":
        five_count += 1
    case "7":
        seven_count += 1
    default:
        break
    }
}

print(five_count == 2 && seven_count == 1 ? "YES" : "NO")


var input_lines = [String]()
while let input = readLine() { input_lines += input.split(separator: " ") }

var five_count = 0
var seven_count = 0

input_lines.forEach { (input: String) in
    switch input {
    case "5":
        five_count += 1
    case "7":
        seven_count += 1
    default:
        break
    }
}

print(five_count == 2 && seven_count == 1 ? "YES" : "NO")


var input_lines = [String]()
while let input = readLine() { input_lines += [input] }

var five_count = 0
var seven_count = 0

input_lines.forEach { (input: String) in
    switch input {
    case "5":
        five_count += 1
    case "7":
        seven_count += 1
    default:
        break
    }
}

print(five_count == 2 && seven_count == 1 ? "YES" : "NO")


"use strict";

const Main = args => {
  const input = args.trim().split(" ");
  let fiveCounter = 0;
  let sevenCounter = 0;

  input.forEach(e => {
    if (e === '5') {
      fiveCounter++;
    } else if (e === '7') {
      sevenCounter++;
    }
  });

  if (fiveCounter === 2 && sevenCounter === 1) {
    console.log('YES');
  } else {
    console.log('NO');

  }
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const main: number = (input) => {
  input = input.split(" ");
  const A: number[] = parseInt(input[0], 10);
  const B: number[] = parseInt(input[1], 10);
  const C: number[] = parseInt(input[2], 10);

  if (A + B + C === 17) {
    console.log('YES');
  } else {
    console.log('NO');
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const s = stdin
  .split('\n')[0]
  .split(' ')
  .map(Number)

const res = s.filter(e => e === 5).length === 2 && s.filter(e => e === 7).length === 1 ? 1 : 0

console.log(res ? 'YES' : 'NO')


import * as fs from 'fs'
if (fs.readFileSync("/dev/stdin", "utf8").split(' ').filter(a => a == '7').length == 1){console.log('YES')} else {console.log('NO')}


import * as fs from 'fs';

const input = fs.readFileSync("/dev/stdin", "utf8");
let a = input.trim().split(' ')
let seven = 0
let five = 0
if (a.filter(a => a == '7').length == 1
	&& a.filter(a => a == '5').length == 2) {
	console.log('YES')
} else {
	console.log('NG')
}


import * as fs from 'fs';

const input = fs.readFileSync("/dev/stdin", "utf8");
let a = input.trim().split(' ')
let seven = 0
let five = 0
if (a.filter(a => a == '7').length == 1
	&& a.filter(a => a == '5').length == 2) {
	console.log('OK')
} else {
	console.log('NG')
}


a,b = map(int,input().split())
print( max( a + b , a + a - 1 , b + b - 1 ))


a, b = map(int, input().split())
print(max(a+a-1, b+b-1, a+b))


a, b = map(int, input().split())

print(max(2 * a - 1, a + b, 2 * b - 1))


A, B = map(int,input().split())
def ma(A, B):
    x = max(A, B)
    ans = 2 * x - 1
    return ans
print(ma(A, B))


s = list(input())

count = 0

for i in range(1, len(s)):
    if s[i] == s[i-1]:
        count += 1

        if s[i] == '1':
            s[i] = '0'
        else:
            s[i] = '1'

print(count)


s = list(input())

count = 0

for i in range(1, len(s)):
    if s[i-1] == s[i]:
        count += 1

        if s[i] == '1':
            s[i] = '0'
        else:
            s[i] = '1'

print(count)


import java.io.*;
import java.util.*;
import java.util.Map.Entry;

public class Main {

	final boolean isDebug = false;
	String fileName = "input.txt";
	FastScanner sc;
	PrintWriter out;
	final int MOD = (int)1e9+7;
	final int INF = Integer.MAX_VALUE / 2;

	void solve() throws Exception{
		int A = sc.nextInt();
		int B = sc.nextInt();
		int cnt = 0;
		if(A > B){
			cnt += A;
			A--;
		}else{
			cnt += B;
			B--;
		}
		if(A > B){
			cnt += A;
			A--;
		}else{
			cnt += B;
			B--;
		}
		System.out.println(cnt);
	}

	/* end solve */

	/* main */
	public static void main(String[] args) throws Exception {
		new Main().m();
	}

	void m() throws Exception {
		long S = System.currentTimeMillis();
		sc = (isDebug) ? new FastScanner(new FileInputStream(fileName)) : new FastScanner(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.flush();
		long G = System.currentTimeMillis();
		if(isDebug){
			System.out.println("---Debug---");
			System.out.printf("%8d ms", (G-S));
		}
	}
	/* end main */
}
/* end Main */

class FastScanner {
    private InputStream in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    public FastScanner(InputStream in) {
		this.in = in;
	}
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
    	if (hasNextByte()) return buffer[ptr++];
    	else return -1;
    }
    private static boolean isPrintableChar(int c){
    	return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
    	while(hasNextByte() && !isPrintableChar(buffer[ptr]))
    		ptr++; return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
}


/**
 * Created at 20:50 on 2019/04/13
 */

import java.io.*;
import java.util.*;
import java.math.BigInteger;

public class Main {

  static FastScanner sc = new FastScanner();

  public static void main(String[] args) {

    int[] N = new int[2];
    N[0] = sc.nextInt();
    N[1] = sc.nextInt();

    if (N[0] == N[1]) {
      System.out.println(2*N[0]);
    } else {
      int n = Math.max(N[0], N[1]);
      System.out.println(2*n-1);
    }

  }

  static class Debugger {

    static long startTime;
    static boolean on = true;

    //入力受け取り後に呼び出す(入力時間をカウントしないため)
    static void start() {
      startTime = System.currentTimeMillis();
    }

    static void printTime() {
      if (on) System.out.println("(" + (System.currentTimeMillis() - startTime) + "ms)");
    }

    static void toggle() {
      on = !on;
    }

  }

  static class BigInt extends BigInteger {

    BigInteger MOD = new BigInteger("1000000007");
    static BigInt ZERO = new BigInt(0);
    static BigInt ONE = new BigInt(1);
    static BigInt TEN = new BigInt(10);

    public BigInt(long l) {
      super(Long.toString(l));
    }

    public BigInt(BigInteger i) {
      super(i.toByteArray());
    }

    public BigInt pow(int i) {
      return new BigInt(super.pow(i));
    }

    public BigInt[] divideAndRemainder(long l) {
      return divideAndRemainder(new BigInt(l));
    }

    public BigInt[] divideAndRemainder(BigInt i) {
      BigInt[] ret = new BigInt[2];
      BigInteger[] dAndR = super.divideAndRemainder(i);
      ret[0] = new BigInt(dAndR[0]);
      ret[1] = new BigInt(dAndR[1]);
      return ret;
    }

    public BigInt mod(long l) {
      return mod(new BigInt(l));
    }

    public BigInt mod(BigInt i) {
      return new BigInt(super.mod(i));
    }

    public BigInt mod() {
      return new BigInt(super.mod(MOD));
    }

    public BigInt add(long l) {
      return add(new BigInt(l));
    }

    public BigInt add(BigInt i) {
      return new BigInt(super.add(i));
    }

    public BigInt subtract(long l) {
      return subtract(new BigInt(l));
    }

    public BigInt subtract(BigInt i) {
      return new BigInt(super.subtract(i));
    }

    public BigInt multiply(long l) {
      return multiply(new BigInt(l));
    }

    public BigInt multiply(BigInt i) {
      return new BigInt(super.multiply(i));
    }

    public BigInt divide(long l) {
      return divide(new BigInt(l));
    }

    public BigInt divide(BigInt i) {
      return new BigInt(super.divide(i));
    }

    public BigInt abs() {
      return new BigInt(super.abs());
    }

  }

  /*
    add()でインデックスを指定しない場合指定されたソート順に違わない位置に追加する
    (ただしソートされていることが前提となる)
    Comparatorが0を返したとき、それらの順序は保証しない
    (TreeSet, TreeMapと違い削除はしない)
   */
  static class TreeList<E> extends ArrayList<E> {

    Comparator<? super E> comparator;

    TreeList(Comparator<? super E> c) {
      super();
      comparator = c;
    }

    /*
      ソート済みのリストに要素を追加する
     */
    public boolean add(E e) {
      int lowIndex = 0;
      int highIndex = size() - 1;
      int index = 0;

      if (size() == 0) {
        super.add(e);
        return true;
      }

      if (comparator.compare(e, get(0)) < 0) {
        index = 0;
      } else if (comparator.compare(e, get(highIndex)) > 0) {
        index = highIndex + 1;
      } else {
        while (lowIndex <= highIndex) {

          if (highIndex == lowIndex + 1 || highIndex == lowIndex) {
            index = highIndex;
            break;
          }

          int midIndex = (lowIndex + highIndex) / 2;
          ;

          if (comparator.compare(e, get(midIndex)) > 0) {
            lowIndex = midIndex;
          } else {
            highIndex = midIndex;
          }

        }
      }

      super.add(index, e);
      return true;
    }

  }

  static class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
      if (ptr < buflen) {
        return true;
      } else {
        ptr = 0;
        try {
          buflen = in.read(buffer);
        } catch (IOException e) {
          e.printStackTrace();
        }
        if (buflen <= 0) {
          return false;
        }
      }
      return true;
    }

    private int readByte() {
      if (hasNextByte()) return buffer[ptr++];
      else return -1;
    }

    private static boolean isPrintableChar(int c) {
      return 33 <= c && c <= 126;
    }

    private void skipUnprintable() {
      while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
    }

    public boolean hasNext() {
      skipUnprintable();
      return hasNextByte();
    }

    public String next() {
      if (!hasNext()) throw new NoSuchElementException();
      StringBuilder sb = new StringBuilder();
      int b = readByte();
      while (isPrintableChar(b)) {
        sb.appendCodePoint(b);
        b = readByte();
      }
      return sb.toString();
    }

    public long nextLong() {
      if (!hasNext()) throw new NoSuchElementException();
      long n = 0;
      boolean minus = false;
      int b = readByte();
      if (b == '-') {
        minus = true;
        b = readByte();
      }
      if (b < '0' || '9' < b) {
        throw new NumberFormatException();
      }
      while (true) {
        if ('0' <= b && b <= '9') {
          n *= 10;
          n += b - '0';
        } else if (b == -1 || !isPrintableChar(b)) {
          return minus ? -n : n;
        } else {
          throw new NumberFormatException();
        }
        b = readByte();
      }
    }

    public int nextInt() {
      return (int) nextLong();
    }
  }

}


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws Exception {
    try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
      int answer = accept(reader.readLine());
      System.out.println(answer);
    }
  }

  static int accept(String line) {
    final String[] tokens = line.split(" ");
    final int a = Integer.parseInt(tokens[0]);
    final int b = Integer.parseInt(tokens[1]);
    return eval(a, b);
  }

  static int eval(int a, int b) {
    if (a == b) return a * 2;
    int max = Math.max(a, b);
    return max * 2 - 1;
  }

}


#include <bits/stdc++.h>
#define ll long long
#define v vector<int>

using namespace std;

int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
int a,b;
cin>>a>>b;
if(a==b){cout<<a+b <<"\n";}
else{
    cout<<max(a,b)+max(a,b)-1 <<"\n";
}
}


#include <bits/stdc++.h>

using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    if(a>b)
    cout<<(2*a-1);
    else if(a<b)
    cout<<(2*b-1);
    else
    cout<<a+b;
}


import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){

    final Scanner sc = new Scanner(System.in);
    final List<Long> list = new ArrayList<>();
    //final List<Long> list2 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();

    int sum = 0;
    if(a >= b){
        sum += a;
        a--;
    }else{
        sum += b;
        b--;
    }

    if(a >= b){
        sum += a;
    }else{
        b--;
    }

    System.out.println(sum);

}
}


#define _CRT_SECURE_NO_WARNINGS

/* include ***********************/
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>

/* define *************************/
//for
#define REP(i,n) for(int i=0,i##_len=(int)(n);i<i##_len;i++)
#define REPS(i,n) for(int i=1,i##_len=(int)(n);i<=i##_len;i++)
#define RREP(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define RREPS(i,n) for(int i=(int)(n);i>0;i--)
#define FOR(i,s,n) for(int i=(int)(s),i##_len=(int)(n);i<i##_len;i++)
#define RFOR(i,s,n) for(int i=(int)(s)-1,i##_len=(int)(n);i>=i##_len;i--)

//printf
#define PRINTD(d) printf("%d\n",(d))
#define PRINTL(d) printf("%lld\n",(d))

//memset
#define m0(s) memset(s,0,sizeof(s))
#define ml(s) memset(s,63,sizeof(s))
#define fill(s,c) memset(s,c,sizeof(s))

#define INF 1e9
#define MOD 1000000007

typedef long long ll;
typedef unsigned long long ull;

int diff[4][2] = {
	{ 0, -1 },
	{ -1, 0 },
	{ 1, 0 },
	{ 0, 1 },
};
//今回の変数
ll d[1000000];
ll e[3000000];

int Min(int a, int b) {
	return (a)<(b) ? (a) : (b);
}
int Max(int  a, int  b) {
	return (a) > (b) ? (a) : (b);
}
ll Minl(ll a, ll b) {
	return (a)<(b) ? (a) : (b);
}
ll Maxl(ll a, ll b) {
	return (a)>(b) ? (a) : (b);
}

int main() {
	int a, b;
	scanf("%d%d", &a, &b);
	if (a > b) {
		PRINTD(a+(a - 1));
	}
	else if (a < b) {
		PRINTD(b+(b - 1));
	}
	else {
		PRINTD(a+b);
	}
}


#include <iostream>
using namespace std;
int main(){
	int a,b,c;
	cin >> a >> b;
	for(int i=0;i<2;i++){
		if(a>=b){
			c=c+a;
			a--;
		}else{
			c=c+b;
			b--;
		}
	}
	cout << c << "\n";
    return 0;
}


#include<iostream>
using namespace std;
int main()
{
  int A,B;
  cin>>A>>B;
  int ans=0;
  if(A>B){
    ans+=A;
    A--;
  }
  else{
    ans+=B;
    B--;
  }
  if(A>B){
    ans+=A;
    A--;
  }
  else{
    ans+=B;
    B--;
  }
  cout<<ans;

}


#include <iostream>
using namespace std;
int main(){
  int a,b,x=0;
  cin >> a >> b ;
  if(a > b) {
    x +=a;
    a--;
    if(a > b) {
      x+=a;
    }else{x+=b;}
  }else{
    x +=b; b--;
      if(a < b){ x+=b;
      }else{x+=a;}
    }
  return 0;
}


#include <iostream>
using namespace std;
int main(){
  int a,b,x=0;
  cin >> a >> b ;
  if(a > b) {
    x +=a;
    a--;
    if(a > b) {
      x+=a;
    }else{x+=b;}
  }else{
    x +=b; b--;
      if(a < b){ x+=b;
      }else{x+=a;}
    }
  retuen 0;
}


#include <iostream>
using namespace std;
int main(){
  int a,b,x=0;
  cin >> a >> b ;
  if(a > b) {
    x +=a; a--:
    if(a > b) x+=a;
    else x+=b;
  }else{
    x +=b; b--;
      if(a < b) x+=b;
      else x+=a;
    }
  }
  retuen 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void inp_str(int instr[]){
char *ptr;
int z,i,count;
char str[100]={'\0'};
char *ln;

fgets(str, 100, stdin); // 入力："123456\n"
ln = strchr(str, '\n'); /* 改行文字を検索 */
if (ln != NULL) { /* 改行が読み取られていたかどうか */
   *ln = '\0';    /* 改行文字を終端文字に置き換える */
}
else {            /* 入力ストリーム上に文字が残ってる場合 */
   while (1) {    /* 改行文字が読み取られるまで空読みする */
       z = getchar();
      if (z == '\n' || z == EOF) break;
   }
}
	count=0;
    ptr = strtok(str, " ");
    i = atoi(ptr);
    instr[count]=i;
    count=count+1;
    // 2回目以降
    while(ptr != NULL) {
        // strtok関数により変更されたNULLのポインタが先頭
        ptr = strtok(NULL, " ");
        // ptrがNULLの場合エラーが発生するので対処
        if(ptr != NULL) {
		    i = atoi(ptr);
    instr[count]=i;
    		count=count+1;
        }
    }
}

int main(void) {

int input[120];
inp_str(input);

int A,B,C,D,E;
A=input[0];
B=input[1];

//printf("%d\n",A);
//printf("%d\n",B);

D=0;
E=0;

if(A>B){
	E=B;
	D=A;
	C=A-1;
}else{
	E=A;
	D=B;
	C=B-1;
}

if(C>E){
	D=D+C;
}else{
	D=D+E;
}

printf("%d\n",D);

/*

if(flag==1) {
	printf(":(\n");
}else{
printf("Yay!\n");
}

*/
    return 0;
}


#include <stdio.h>
int main(void){
    // Your code here!
    int A,B;
    scanf("%d %d",&A,&B);
    if(A>B)
        printf("%d\n",2*A-1);
    else if(B>A)
        printf("%d\n",2*B-1);
    else
        printf("%d\n",A+B);
}


#include <stdio.h>

int main(void) {
  int a,b;
  int total=0;
  scanf("%d%d",&a,&b);
  for(int i=1;i<=2;i++) {
    if(a>=b) {
      total+=a;
      a--;
    }else{
      total+=b;
      b--;
    }
  }
  printf("%d\n",total);
  return 0;
}


#include<stdio.h>
int main()
{
    int a,b,x,y;
    scanf("%d%d",&a,&b);
    if(a>=b)
    {
        x=a;
        a=a-1;
        if(a>=b)
        {
            y=a;
        }
        else
        {
            y=b;
        }
    }
    else
    {
        x=b;
        a=b-1;
        if(b>=a)
        {
            y=b;
        }
        else
        {
            y=a;
        }
    }

    printf("%d",x+y);
    return 0;
}


#include<stdio.h>
int main()
{
    int a,b;

    scanf("%d %d",&a,&b);

    if(a>=3 && b<=20)
    {
    if(a-1>b) printf("%d\n",a+a-1);

    else printf("%d\n",a+b);

    return 0;
    }
}


#include<stdio.h>
int main()
{
    int a,b;

    scanf("%d %d",&a,&b);

    if(a-1>b) printf("%d\n",a+a-1);

    else printf("%d\n",a+b);

    return 0;
}


function Main(input){
var A = input.split(" ")[0];
var B = input.split(" ")[1];
A = parseInt(A,10);
B = parseInt(B,10);
var coin = 0;
for(i=0;i<=1;i++){
  if(A>=B){
    coin += A;
    A -= 1;
  }else{
    coin += B;
    B -= 1;
  }
}
console.log(coin);
}
  Main(require('fs').readFileSync('/dev/stdin','utf8'));


function main(input) {
    var data = input.split(' ');
    var a = parseInt(data[0]);
    var b = parseInt(data[1]);
    var ans = a + b;
    if(a>b){
        ans = 2 * a - 1;
    }else if(a<b){
        ans = 2 * b - 1;
    }
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
  const A = parseInt(input.split(" ")[0],10);
  const B = parseInt(input.split(" ")[1],10);
  if(A>B){
    console.log(2*A-1);
  }else if(A<B){
    console.log(2*B-1);
  }else{
    console.log(2*A);
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const main = stdin => {
  const input = stdin.trim().split('\n')

  const [A, B] = input[0].split(' ').map(x => parseInt(x))
  if (Math.abs(A - B) > 1) {
    console.log(A + A - 1)
  } else {
    console.log(A + B)
  }
}
// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))


function main(input) {
    var data = input.split(' ');
    var a = parseInt(data[0]);
    var b = parseInt(data[1]);
    var ans = a + b;
    if(a>b){
        ans = 2 * a - 1;
    }else{
        ans = 2 * b - 1;
    }
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function Main(input) {
    input = input.trim()
  input = input.split(" ");
console.log(Math.max(input[0]+input[1],input[0]*2-1,input[1]*2-1))
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	// "regexp"
)

/* sort */
type pair struct {
	index  int64
	p1, p2 interface{}
}
type pairs []pair

func (slice pairs) Len() int {
	return len(slice)
}

func (slice pairs) Less(i, j int) bool {
	return slice[i].index < slice[j].index
}

func (slice pairs) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

/* sort */
type Int64Slice []int64

func (slice Int64Slice) Len() int {
	return len(slice)
}

func (slice Int64Slice) Less(i, j int) bool {
	return slice[i] < slice[j]
}

func (slice Int64Slice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}
func Int64s(a []int64)                    { sort.Sort(Int64Slice(a)) }
func Int64sSliceAreSorted(a []int64) bool { return sort.IsSorted(Int64Slice(a)) }

const (
	initialBufSize = 1e4
	maxBufSize     = 1e8
	INF            = 1e8
)

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
	di      = []int64{-1, 0, 1, 0}
	dj      = []int64{0, -1, 0, 1}
)

func main() {
	buf := make([]byte, initialBufSize)
	scanner.Buffer(buf, maxBufSize)
	scanner.Split(bufio.ScanWords)
	A, B := readInt(), readInt()
	m := max(A, B)
	if A == B {
		fmt.Println(A + B)
	} else {
		fmt.Println(m + m - 1)
	}
}
func max(a int64, b int64) int64 {
	return int64(math.Max(float64(a), float64(b)))
}

/*==========================================
 *             Library
 *==========================================*/
func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}
func doubleAry(h int64, w int64, init int64) (res [][]int64) {
	res = make([][]int64, h)
	for i := int64(0); i < h; i++ {
		res[i] = make([]int64, w)
		for j := int64(0); j < w; j++ {
			res[i][j] = init
		}
	}
	return
}

func aryEq(a []int64, b []int64) bool {
	return reflect.DeepEqual(a, b)
}

func clone(n []int64) (r []int64) {
	r = make([]int64, len(n))
	for i := 0; i < len(n); i++ {
		r[i] = n[i]
	}
	return
}
func write(s string) {
	writer.WriteString(s)
}

func print() {
	writer.Flush()
}

// scanner.Split(bufio.ScanWords) をコメントアウトしないと使用不可
func readLine() (s string) {
	if scanner.Scan() {
		s = scanner.Text()
	}
	return s
}

func readInt() (read int64) {
	scanner.Scan()
	read, err := strconv.ParseInt(scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return
}

func readFloat() (read float64) {
	scanner.Scan()
	read, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return
}

func readRunes() (read []rune) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, v)
	}
	return
}

func readString() (read string) {
	scanner.Scan()
	read = scanner.Text()
	return
}

func readStrings() (read []string) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, string(v))
	}
	return
}

func s2i(s string) int64 {
	var intVal, e = strconv.ParseInt(s, 10, 64)
	if e != nil {
		panic(e)
	}
	return intVal
}

func i2s(i int64) string {
	var strVal = strconv.FormatInt(i, 10)
	return strVal
}

func s2f(s string) float64 {
	var floatVal, e = strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return floatVal
}

func abs(i int64) int64 {
	return int64(math.Abs(float64(i)))
}

func sum(i []int64) int64 {
	sum := int64(0)
	for _, val := range i {
		sum += val
	}
	return sum
}

func split(s string) []string {
	return strings.Fields(s)
}

func strAry2intAry(strs []string) []int64 {
	var ret = make([]int64, 0, len(strs))
	for _, str := range strs {
		var intVal = s2i(str)
		ret = append(ret, intVal)
	}
	return ret
}

func intAry2strAry(nums []int64) []string {
	var ret = make([]string, 0, len(nums))
	for _, num := range nums {
		var strVal = i2s(num)
		ret = append(ret, strVal)
	}
	return ret
}

func ary2str(strs []string) string {
	return strings.Join(strs, " ")
}

func reverse(res []int64) []int64 {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}
func reverseStr(res []string) []string {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}

func ini(res []int, init int) {
	if len(res) == 0 {
		return
	}
	res[0] = init
	for i := 0; i < len(res); i++ {
		copy(res[i:], res[:i])
	}
}

//
// func regexpExample() {
//     // Your code here!
//     var str = "13:20"
//     r := regexp.MustCompile(`(\d+):(\d+)`)
//     fmt.Println(r.FindStringSubmatch(str))
// }

// type Country struct {
//     gold int
//     silver int
//     blonze int
// }

// // 複数ソートのサンプル
// func stableSortExample() []Country{
//     var country = []Country {
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:3, blonze:2},
//         {gold:1, silver:3, blonze:3},
//     }
//     sort.SliceStable(country, func(i, j int) bool { return country[i].blonze > country[j].blonze })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].silver > country[j].silver })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].gold > country[j].gold })
//     return country
// }


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	if a > b {
		fmt.Println(a+a-1)
	} else if b > a {
		fmt.Println(b+b-1)
	} else {
		fmt.Println(a+b)
	}
}


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)

	var res int
	for i := 0; i < 2; i++ {
		if a > b {
			res += a
			a--
		} else {
			res += b
			b--
		}
	}

	fmt.Println(res)
}


package main

import (
  "fmt"
)

func main() {
  var a, b int
  fmt.Scanf("%d %d", a, b)

  ans := 0
  if a == b {
    ans = a + b
  }
  if a > b {
    ans = a + (a - 1)
  }
  if a < b {
    ans = b + (b - 1)
  }

  fmt.Printf("%d\n", ans)
}


package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)

	result := 0
	if a > b {
		a--
		if a > b {
			result = 2*a + 1
		} else {
			result = a + b
		}
	} else if a < b {
		b--
		if a > b {
			result = b + a
		} else {
			result = 2*b + 1
		}
	} else {
		result = 2 * a
	}
	fmt.Println(result)

}


package main

import (
	"bufio"
	"fmt"
	"log"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	log.SetFlags(log.Lshortfile)
	a := nextInt()
	b := nextInt()
	fmt.Println(max(a, b) + max(a, b) - 1)
}

func nextString() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

var dy = []int{0, 1, 0, -1}
var dx = []int{1, 0, -1, 0}
var MAX = math.MaxInt32

func pow(a, b int) int {
	return int(math.Pow(float64(a), float64(b)))
}

func lcm(a, b int) int {
	return a * b / gcd(a, b)
}
func gcd(a, b int) int {
	if a < b {
		a, b = b, a
	}
	for b != 0 {
		a, b = b, a%b
	}
	return a
}
func max(a ...int) int {
	r := a[0]
	for i := 0; i < len(a); i++ {
		if r < a[i] {
			r = a[i]
		}
	}
	return r
}
func min(a ...int) int {
	r := a[0]
	for i := 0; i < len(a); i++ {
		if r > a[i] {
			r = a[i]
		}
	}
	return r
}
func sum(a []int) (r int) {
	for i := range a {
		r += a[i]
	}
	return r
}
func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

type Pair struct {
	a, b int
}

type Pairs []Pair

func (p Pairs) Len() int {
	return len(p)
}
func (p Pairs) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p Pairs) Less(i, j int) bool {
	if p[i].a == p[j].a {
		return p[i].b < p[j].b
	}
	return p[i].a < p[j].a
}


a,b=gets.split.map(&:to_i);
p a==b ? a*2 : [a,b].max+[a,b].max-1


a, b = gets.split.map(&:to_i)
res = 0
res += [a, b].max
if a > b
  a -= 1
else
  b -= 1
end
res += [a, b].max
puts res


buttons = gets.chomp.split(" ").map(&:to_i)
buttons[2] = buttons[0]-1
buttons[3] = buttons[1]-1
buttons = buttons.sort {|a, b| b <=> a }
puts buttons[0]+buttons[1]


a,b = gets.chomp.split(' ').map(&:to_i)
puts [2*a -1, 2*b-1,a+b].min


a,b=gets.split.map(&:to_i).sort
p a==b ?2*a:[a..b][-2,2].sum


a,b=gets.split.map(&:to_i)
mx=[a,b].max
mn=[a,b].min
if mx-mn => 2 then
  p mx + mx - 1
else
  p mx + mn
end


#![allow(dead_code, unused_variables, unused_macros, unused_imports)]

// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next = move || -> String{ bytes .by_ref() .map(|r|r.unwrap() as char) .skip_while(|c|c.is_whitespace()) .take_while(|c|!c.is_whitespace()) .collect() }; input_inner!{next, $($r)*} }; }
macro_rules! input_inner { ($next:expr) => {}; ($next:expr, ) => {}; ($next:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($next, $t); input_inner!{$next $($r)*} }; ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => { let mut $var = read_value!($next, $t); input_inner!{$next $($r)*} }; }
macro_rules! read_value { ($next:expr, ( $($t:tt),* )) => { ( $(read_value!($next, $t)),* ) }; ($next:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() }; ($next:expr, chars) => { read_value!($next, String).chars().collect::<Vec<char>>() }; ($next:expr, usize1) => { read_value!($next, usize) - 1 }; ($next:expr, $t:ty) => { $next().parse::<$t>().expect("Parse error") }; }

fn main() {
    input! {
        mut a: i32,
        mut b: i32,
    }

    let mut ans = 0;
    if a > b {
        ans += a;
        a -= 1;
    } else {
        ans += b;
        b -= 1;
    }
    if a > b {
        ans += a;
    } else {
        ans += b;
    }
    println!("{}", ans);
}


use std::cmp::max;
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    a: usize,
    b: usize,
    }
    let ans = max(a + (a - 1), max(a + b, b + (b - 1)));
    println!("{}", ans);
}


fn main() {
    let ab = read_vec::<usize>();
    let ret = if ab[0] == ab[1] {
        ab[0] + ab[1]
    } else if ab[0] > ab[1] {
        ab[0] + (ab[0] - 1)
    } else {
        ab[1] + (ab[1] - 1)
    };
    println!("{}", ret);
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}


use std::io::{stdin, Read};
use std::str::FromStr;
use std::collections::HashSet;
use std::iter::FromIterator;
use std::cmp;

fn read<T: FromStr>() -> Option<T> {
    let stdin = stdin();
    let s = stdin
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok()
}

fn main() {
    let a: i64 = read().unwrap();
    let b: i64 = read().unwrap();
    let larger: i64 = cmp::max(a, b);
    println!("{}", larger + larger - 1);
}


use proconio::input;
fn main() {
    input!{
        a: i32,
        b: i32
    }
    if a==b {
        println!("{}", a*2)
    }
    let m  = std::cmp::max(a,b);
    println!("{}", 2*m-1)
}


use std::io;
use std::cmp::max;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<i32> = procon_read();
	let a = v[0];
	let b = v[1];
	println!("{}",max(max(max(a+(a-1), b+(b-1)), a+(b-1)), b + (a-1)));
}


var arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

if( arr[0] < arr[1] ) {
  var temp = arr[0]
  arr[0] = arr[1]
  arr[1] = temp
}

switch (arr[0] == arr[1]) {
case true:
	print( arr[0] * 2 )
default:
  	print( arr[0] + arr[0] - 1 )
}


import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    func count() -> Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
}
extension Array where Element: Comparable {
    func max() -> Element! {
        return self.maxElement()
    }
    func min() -> Element! {
        return self.minElement()
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/

/*************** メインプログラム ***************/

let i = readIntSplit(by: " ")
print(i[0]==i[1] ?i[0]*2:i.max()*2-1)


import Foundation

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

var A = Int(split[0])!
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
var B = Int(split[1])!

var coin = 0
if (A >= B){
    coin += A
    A -= 1
}else{
    coin += B
    B -= 1
}
if (A >= B){
    coin += A
}else{
    coin += B
}

print(coin)


import Foundation
let X = readLine()!
let Y = readLine()!
let x = 0
if (X >= Y){
    x += X
    X -= 1
}else{
    x += Y
    Y -= 1
}
if (X >= Y){
    x += X
    X -= 1
}else{
    x += Y
    Y -= 1
}
print(x)


((input: string): void => {
    let [a, b]: number[] = input.split(" ").map(Number).sort(
        (x, y) => { return y-x; }
    );
    console.log(a + (--a>b ? a : b));
})(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from 'fs';

//in
// 5 3
//out
// 9
const main = (inp: string) => {
    let buttons: number[] = inp.split(' ').map(Number);
    let ans: number = 0;
    for (let i: number = 0; i < 2; i++) {
        buttons = buttons.sort((a, b) => {
            return b - a
        });
        ans += buttons[0];
        buttons[0]--;
    }
    console.log(ans);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


function readInt(str) {
  return parseInt(str, 10);
}
function Main(raw: string) {
  const input = raw.split("\n");
  const [A,B]=input[0].split(" ").map(readInt);

  //出力
  console.log("%d", Math.max(Math.max(2*A-1,2*B-1),A+B));
}

//DO NOT EDIT
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


const main = (input) => {
  let [a, b] = input.split(" ").map(Number)
  let r = 0
  for (var i = 0; i < 2; i++) {
    let c = 0
    if (a < b) {
      c = b
      b--
    } else {
      c = a
      a--
    }
    r += c
  }
  return r
}


S = input()
print(S[:4] + ' ' +S[4:])


s=input();print(s[:4]+' '+s[-8:])


s = input()
print(s[:4] + " " + s[4:])


`r`````````````````. ````````@|@|@|@|@|@|@|@|@|@|@|@|i


N = int(input())
nums = list(map(int, input().split()))
answer = 0
for i, num in enumerate(nums, start=1):
  if i == nums[num-1] and i < num:
    answer += 1
print(answer)


a = list(input())

for i in range(len(a)):
    print(a[i], end = "")
    if i == 3:
        print(" ", end = "")
        i -= 1


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			StringBuilder sb = new StringBuilder ();
			for(int i = 0; i < str.length();i++) {
				sb.append(str.charAt(i));
				if(i == 3) sb.append(" ");
			}

			System.out.println(sb);
//			long max  = 1000000007;
		}catch (Exception e) {
			System.exit(0);
		}
	}

}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.NoSuchElementException;

public class Main {

    public static void main(String[] args) throws IOException {
        new Main().solve();
    }

    private void solve() throws IOException {
        try {
            solveA();
//            solveB();
//            solveC();
//            solveD();
//            solveE();
//            solveF();
        } finally {
            if (in != null) {
                in.close();
            }
            if (out != null) {
                out.flush();
                out.close();
            }
        }

    }

    // mods
    long MOD = (long) Math.pow(10, 9) + 7;

    private void solveA() {
        String s = next();
        out.println(s.substring(0, 4) + " " + s.substring(4));
    }

    private void solveB() {

    }

    private void solveC() {

    }

    private void solveD() {

    }

    private void solveE() {

    }

    private void solveF() {

    }

    private static class SegTree {
        long e = 0;

        long calcFunc(long a, long b) {
            return a + b;
        }

        int n;
        long nodes[];

        public SegTree(long[] a) {
            init(a);
        }

        public SegTree(int len, long x) {
            long a[] = new long[len];
            Arrays.fill(a, x);
            init(a);
        }

        public SegTree(int len) {
            init(len);
        }

        void init(long[] a) {
            init(a.length);
            for (int i = 0; i < a.length; i++) {
                nodes[i + n - 1] = a[i];
            }
            for (int i = n - 2; i >= 0; i--) {
                nodes[i] = calcFunc(nodes[i * 2 + 1], nodes[i * 2 + 2]);
            }
        }

        void init(int len) {
            n = 1;
            while (n < len) {
                n *= 2;
            }
            nodes = new long[n * 2 - 1];
            Arrays.fill(nodes, e);
            for (int i = n - 2; i >= 0; i--) {
                nodes[i] = calcFunc(nodes[i * 2 + 1], nodes[i * 2 + 2]);
            }
        }

        void set(final int i, long val) {
            int wkI = i + n - 1;
            nodes[wkI] = val;
            while (wkI > 0) {
                wkI = (wkI - 1) / 2;
                nodes[wkI] = calcFunc(nodes[wkI * 2 + 1], nodes[wkI * 2 + 2]);
            }
        }

        long get(int i) {
            return find(i, i + 1);
        }

        /*
       要求区間 [a, b) 中の要素の最小値を答える
       k := 自分がいるノードのインデックス
       対象区間は [l, r) にあたる
        */
        long find(int a, int b) {
            return find(a, b, 0, 0, n);
        }

        long find(int a, int b, int k, int l, int r) {
            if (r < 0)
                r = n;

            if (b <= l || r <= a)
                return e;

            if (a <= l && r <= b)
                return nodes[k];

            long val1 = find(a, b, k * 2 + 1, l, (l + r) / 2);
            long val2 = find(a, b, k * 2 + 2, (l + r) / 2, r);
            //Math.min()
            //今回は区間内の個数なのでSUM
            return val1 + val2;
        }
    }

    private static class UnionFind {
        int[] pars;

        public UnionFind(int n) {
            pars = new int[n + 1];
            Arrays.fill(pars, -1);
        }

        public int getChilds(int n) {
            int wk = getRoot(n);
            return pars[wk];
        }

        public int getRoot(int n) {
            if (pars[n] < 0)
                return n;
            return pars[n] = getRoot(pars[n]);
        }

        public boolean isSame(int a, int b) {
            return getRoot(a) == getRoot(b);
        }

        private int getSize(int a) {
            return -pars[getRoot(a)];
        }

        public void unite(int a, int b) {
            int wkA = getRoot(a);
            int wkB = getRoot(b);
            if (wkA == wkB)
                return;

            if (getSize(wkA) < getSize(wkB)) {
                int tmp = wkA;
                wkA = wkB;
                wkB = tmp;
            }
            pars[wkA] = pars[wkA] + pars[wkB];
            pars[wkB] = wkA;
        }
    }

    public long calcSimpleCombination(long n, long m, long CONST_MOD) {
        long mole = 1;
        for (long i = 1; i <= n + m; i++) {
            mole *= i;
            mole %= CONST_MOD;
        }
        long deno = 1;
        for (long i = 1; i <= n; i++) {
            deno *= i;
            deno %= CONST_MOD;
        }
        for (int i = 1; i <= m; i++) {
            deno *= i;
            deno %= CONST_MOD;
        }
        deno = modInverse(deno, CONST_MOD);
        return (mole * deno) % CONST_MOD;
    }

    long abs(double x) {
        return (long) Math.abs(x);
    }

    long round(double x) {
        return Math.round(x);
    }

    long floor(double x) {
        return (long) Math.floor(x);
    }

    long ceil(double x) {
        return (long) Math.ceil(x);
    }

    double sqrt(double x) {
        return Math.sqrt(x);
    }

    double pow(double x, double y) {
        return Math.pow(x, y);
    }

    long pow(long x, long y) {
        return (long) Math.pow(x, y);
    }

    int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }

    int upperToInt(char a) {
        return a - 'A';
    }

    int lowerToInt(char a) {
        return a - 'a';
    }

    int numToInt(char a) {
        return a - '0';
    }

    int charToInt(char a) {
        return a >= 'a' ? lowerToInt(a) : a >= 'A' ? upperToInt(a) : numToInt(a);
    }

    char intToUpper(int a) {
        return (char) (a + 'A');
    }

    char intToLower(int a) {
        return (char) (a + 'a');
    }

    char intToNum(int a) {
        return (char) (a + '0');
    }

    void reverse(String array[]) {
        String reversed[] = new String[array.length];
        for (int i = 0; i < array.length; i++) {
            reversed[array.length - i - 1] = array[i];
        }
        for (int i = 0; i < array.length; i++) {
            array[i] = reversed[i];
        }
    }

    void reverse(int array[]) {
        int reversed[] = new int[array.length];
        for (int i = 0; i < array.length; i++) {
            reversed[array.length - i - 1] = array[i];
        }
        for (int i = 0; i < array.length; i++) {
            array[i] = reversed[i];
        }
    }

    void reverse(long array[]) {
        long reversed[] = new long[array.length];
        for (int i = 0; i < array.length; i++) {
            reversed[array.length - i - 1] = array[i];
        }
        for (int i = 0; i < array.length; i++) {
            array[i] = reversed[i];
        }
    }

    void reverse(double array[]) {
        double reversed[] = new double[array.length];
        for (int i = 0; i < array.length; i++) {
            reversed[array.length - i - 1] = array[i];
        }
        for (int i = 0; i < array.length; i++) {
            array[i] = reversed[i];
        }
    }

    void reverse(boolean array[]) {
        boolean reversed[] = new boolean[array.length];
        for (int i = 0; i < array.length; i++) {
            reversed[array.length - i - 1] = array[i];
        }
        for (int i = 0; i < array.length; i++) {
            array[i] = reversed[i];
        }
    }

    void fill(int array[], int x) {
        Arrays.fill(array, x);
    }

    void fill(long array[], long x) {
        Arrays.fill(array, x);
    }

    void fill(double array[], double x) {
        Arrays.fill(array, x);
    }

    void fill(boolean array[], boolean x) {
        Arrays.fill(array, x);
    }

    void fill(int array[][], int x) {
        for (int a[] : array) {
            fill(a, x);
        }
    }

    void fill(long array[][], long x) {
        for (long a[] : array) {
            fill(a, x);
        }
    }

    void fill(double array[][], double x) {
        for (double a[] : array) {
            fill(a, x);
        }
    }

    void fill(boolean array[][], boolean x) {
        for (boolean a[] : array) {
            fill(a, x);
        }
    }

    void fill(int array[][][], int x) {
        for (int a[][] : array) {
            fill(a, x);
        }
    }

    void fill(long array[][][], long x) {
        for (long a[][] : array) {
            fill(a, x);
        }
    }

    void fill(double array[][][], double x) {
        for (double a[][] : array) {
            fill(a, x);
        }
    }

    void fill(boolean array[][][], boolean x) {
        for (boolean a[][] : array) {
            fill(a, x);
        }
    }

    long INF = (long) 1e18 + 7;

    boolean isINF(long a) {
        return abs(a) > INF / 1000;
    }

    boolean isPlusINF(long a) {
        return a > 0 && isINF(a);
    }

    boolean isMinusINF(long a) {
        return isPlusINF(-a);
    }

    int I_INF = (int) 1e9 + 7;

    boolean isINF(int a) {
        return abs(a) > I_INF / 1000;
    }

    boolean isPlusINF(int a) {
        return a > 0 && isINF(a);
    }

    boolean isMinusINF(int a) {
        return isPlusINF(-a);
    }

    public long mod(long i) {
        return i % MOD + ((i % MOD) < 0 ? MOD : 0);
    }

    long powMod(long x, long y) {
        if (y == 0) {
            return 1;
        } else {
            long tmp = powMod(x, y / 2);
            return mod(mod(tmp * tmp) * (y % 2 == 0 ? 1 : x));
        }
    }

    long[] powsMod(long x, int max) {
        long pow[] = new long[max + 1];
        pow[0] = 1;
        for (int i = 0; i < max; i++) {
            pow[i + 1] = mod(pow[i] * x);
        }
        return pow;
    }

    long inv(long x) {
        return powMod(x, MOD - 2);
    }

    int MAX_FACT = 5_000_100;
    long fact[];
    long invFact[];

    /**
     * Combination簡易版
     * 5 C 2
     * 異なる n個のものから r個を選ぶ組み合わせの総数 nCr を求めます。
     * 5!(5*4*3*2*1)
     * /
     * 2!(2*1) *  (5-2)!(3*2*1)
     *
     * @param n
     * @param r
     * @return
     */
    private long getComb(int n, int r) {
        long tmp = 1;
        for (int i = 1; i <= r; i++) {
            tmp *= n - i + 1;
            tmp = mod(tmp);
            tmp *= inv(i);
            tmp = mod(tmp);
        }
        return tmp;
    }

    /**
     * 階乗計算の事前累積和
     * [1, 1, 2, 3, 4, 5, … FACTORIAL_NUM]
     * mod済
     */
    void prepareFact() {
        fact = new long[MAX_FACT];
        Arrays.fill(fact, 0);
        invFact = new long[MAX_FACT];
        Arrays.fill(invFact, 0);
        fact[0] = 1;
        int maxIndex = (int) min(MAX_FACT, (int) MOD);
        for (int i = 1; i < maxIndex; i++) {
            fact[i] = mod(fact[i - 1] * i);
        }
        invFact[maxIndex - 1] = inv(fact[maxIndex - 1]);
        for (int i = maxIndex - 1; i > 0; i--) {
            invFact[i - 1] = mod(invFact[i] * i);
        }
    }

    /**
     * 順列
     * nPk -> n! / (n-k)!
     *
     * @param n
     * @param r
     * @return
     */
    long permutation(int n, int r) {
        if (n < 0 || r < 0 || n < r) {
            return 0;
        }
        return mod(fact[n] * invFact[n - r]);
    }

    /**
     * 組み合わせ
     * nCk -> n! / k!・(n-k)!
     *
     * @param n
     * @param r
     * @return
     */
    long combination(int n, int r) {
        if (n < 0 || r < 0 || n < r) {
            return 0;
        }
        return mod(permutation(n, r) * invFact[r]);
    }

    /**
     * 重複組合せ nHr （同次積）
     * nHr = (n+r-1)Cr
     * 異なるn個のものから重複を許してr個取る組合せの総数
     * 例：
     * リンゴ，ミカン，牛肉の3種類の果物があります．これらの中から6個の食材を買って帰ります．
     * このとき，何通りの買い方がありますか？ただし，含まれない食材があってもよいものとします
     *
     * @param n
     * @param r
     * @return
     */
    long homogeneousProduct(int n, int r) {
        return combination((n - 1) + r, r);
    }

    /**
     * 多項係数
     * 文字aをp個,bをq個,cをr個, dをs個 あわせてn個を1列に並べるときの並べ方
     * n! / p!・q!・r!・s!
     *
     * @param n
     * @param strNum
     * @param mod
     * @return
     */

    /**
     * フェルマーの小定理を用いて逆元を求める。
     * ある数xのmod p（pは素数）の逆数x'はx' = x^(p-2)
     * 繰り返し二乗法を用いて計算する。
     * http://satanic0258.hatenablog.com/entry/2016/04/29/004730
     * {@link BigInteger#modInverse(BigInteger)}とどちらが速いか？
     *
     * @param x
     * @return
     */
    private long modInverse(long x, long mod) {
        long res = 1L;
        long k = mod - 2L;
        long y = x;
        while (k != 0) {
            if (k % 2 != 0) {
                res = (res * y) % mod;
            }
            y = (y * y) % mod;
            k /= 2;
        }
        return res;
    }

    private final PrintWriter out = new PrintWriter(System.out);
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    private void skipUnprintable() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
    }

    public boolean hasNext() {
        skipUnprintable();
        return hasNextByte();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public long min(long... v) {
        long min = Long.MAX_VALUE;
        for (long i : v) min = Math.min(min, i);
        return min;
    }

    public long max(long... v) {
        long max = Long.MIN_VALUE;
        for (long i : v) max = Math.max(max, i);
        return max;
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ACODEFESTIVAL2016 solver = new ACODEFESTIVAL2016();
        solver.solve(1, in, out);
        out.close();
    }

    static class ACODEFESTIVAL2016 {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            String s = in.readString();
            out.printLine(new StringBuilder(s).insert(4, " ").toString());
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		ArrayList<String> s = nextCharArray();
		s.set(4, " ");
		myout(myconv(s, 0));
	}
	//Method addition frame start

	//Method addition frame end
}


import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);
	    String s=gs();

	    System.out.print(s.substring(0,4) + " " + s.substring(4,12));
//	    if (n%10==3) {
//	    	System.out.print("bon");
//	    }else if(n%10==0 || n%10==1 || n%10==6 || n%10==8){
//	    	System.out.print("pon");
//	    } else {
//	    	System.out.print("hon");
//	    }

	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}


import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);
	    String s=gs();

	    System.out.print(s.substring(0,4) + " " + s.substring(4));
//	    if (n%10==3) {
//	    	System.out.print("bon");
//	    }else if(n%10==0 || n%10==1 || n%10==6 || n%10==8){
//	    	System.out.print("pon");
//	    } else {
//	    	System.out.print("hon");
//	    }

	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}


#include<cstdio>
int main()
{
    char s[20];
    scanf("%s",s);
    for(int i=0;i<4;i++) printf("%c",s[i]);
    printf(" ");
    for(int i=4;i<12;i++) printf("%c",s[i]);
    printf("\n");
    return 0;
}


#include <cstdio>

using namespace std;

int main() {
  char s[100];
  scanf("%s", s);
  for(int i=0;i<12;++i) {
    printf("%c", s[i]);
    if (i==3) {
      printf(" ");
    }
  }
  printf("\n");
  return 0;
}


#include<cstdio>
int main(){
    char s[13];
    scanf("%s",s);
    for(int i=0;i<12;i++){
        printf("%c",s[i]);
        if(i==3)printf(" ");
    }
    printf("\n");
    return 0;
}


#include <vector>
#include <iostream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <cmath>

using namespace std;

template<typename T, typename S>
istream& operator >> (istream& is, pair<T, S>& p) {
    is >> p.first >> p.second;
    return is;
}

template<typename T>
istream& operator >> (istream& is, vector<T>& v) {
    for (auto& x : v) {
        is >> x;
    }
    return is;
}

template<typename T>
ostream& operator << (ostream& os, const vector<T>& v) {
    for (auto& x : v) {
        os << x << " ";
    }
    os << "\n";
    return os;
}

bool dfs(int v, int64_t s, const vector<vector<pair<int, int64_t>>>& e, vector<int>& used, vector<int64_t>& ans, vector<int>& comp) {
    used[v] = 1;
    comp.push_back(v);
    ans[v] = s;
    for (auto [u, a] : e[v]) {
        if (!used[u]) {
            if (!dfs(u, a - s, e, used, ans, comp)) return false;
        } else {
            if (ans[u] + s != a) return false;
        }
    }
    return true;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int R, C, N;
    cin >> R >> C >> N;
    vector<vector<pair<int, int64_t>>> e(R + C);
    for (int i = 0; i < N; ++i) {
        int r, c, a;
        cin >> r >> c >> a;
        --r, --c;
        e[r].push_back({R + c, a});
        e[R + c].push_back({r, a});
    }
    vector<int> used(R + C);
    vector<int64_t> ans(R + C);
    vector<int64_t> AA, BB;
    for (int i = 0; i < R + C; ++i) {
        if (!used[i]) {
            vector<int> comp;
            if (!dfs(i, 0, e, used, ans, comp)) {
                cout << "No";
                return 0;
            }
            vector<int> A, B;
            for (auto j : comp) {
                if (j < R) A.push_back(ans[j]);
                else B.push_back(ans[j]);
            }
            if (A.empty() || B.empty()) continue;
            int64_t minA = *min_element(A.begin(), A.end());
            int64_t minB = *min_element(B.begin(), B.end());
            if (minA + minB < 0) {
                cout << "No";
                return 0;
            }
            AA.push_back(minA);
            BB.push_back(minB);
        }
    }
    set<pair<int64_t, int>> As, Bs;
    for (int i = 0; i < AA.size(); ++i) {
        As.insert({AA[i], i});
        Bs.insert({BB[i], i});
    }
    for (int t = 0; t <= R + C; ++t) {
        int64_t minA = As.begin()->first;
        int ia = As.begin()->second;
        int64_t minB = Bs.begin()->first;
        int ib = Bs.begin()->second;
        if (minA + minB >= 0) {
            cout << "Yes";
            return 0;
        }
        if (ia == ib) {
            cout << "No";
            return 0;
        }
        int64_t s = minA + minB;
        As.erase({AA[ia], ia});
        AA[ia] -= s;
        As.insert({AA[ia], ia});
        Bs.erase({BB[ia], ia});
        BB[ia] += s;
        Bs.insert({BB[ia], ia});
    }
    cout << "No";
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	for (int i = 0; i < 4; i++) putchar(getchar());
	putchar(' ');
	for (int i = 0; i < 8; i++) putchar(getchar());
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    cin >> s;
    printf("%s %s",s.substr(0,4),s.substr(4));
}


#include<stdio.h>

int main()
{
  char s[13];

  scanf("%s", s);

  printf("%.4s %s\n", s, &s[4]);

  return 0;
}


#include<stdio.h>
int main(){
	char s[99];
	scanf("%s",s);
	for(int i=0;i<4;i++)putchar(s[i]);
	putchar(32);
	for(int i=4;i<12;i++)putchar(s[i]);
	putchar(10);
}


#include <stdio.h>

int main(void){

        char s[13];
        scanf("%s",s);

        int i = 0;

        while(s[i]){
                printf("%c",s[i]);
                if(i==3){
                        printf(" ");
                }
                i++;
        }
printf("\n");
return 0;
}


#include<stdio.h>
int main(){
	char s[99];
	scanf("%s",s);
	for(int i=0;i<4;i++)putchar(s[i]);
	putchar(32);
	for(int i=4;i<12;i++)putchar(s[i]);

}


#include <stdio.h>

int main()
{
  char s[13];
  scanf("%s",&s);
  int i;
  i = 0;
  while (s[i])
  {
    printf("%c",s[i]);
    if (i == 3)
    {
      printf(' ');
    }
    i++;
  }
  printf("\n");
}


#include <stdio.h>

int main()
{
  char s[13];
  scanf("%s",&s);
  int i;
  i = 0;
  while (s[i])
  {
    printf("%c",s[i]);
    if (i == 3)
    {
      printf(" ");
    }
    i++;
  }
}


'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const s = args[0][0]
	console.log(`${s.slice(0, 4)} ${s.slice(4, 12)}`)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


function Main(input) {
	input = input.split("");
	input.splice(4,0," ");
	console.log(input.join(""))
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


function Main(input) {
	input = input.trim();
  var mae = input.slice(0,4);
  var ato = input.slice(4,12);
  console.log(mae + " " + ato);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
    input = input.split('\n');
    array = input[1].split(" ");
    array= array.map(Number);

    var nakayoshi = 0;
    for (var index = 0; index < array.length; index++) {
        if(array[index] == array[array[index]-1]){}
        else if(array[index] < array[array[index]-1] ){
            nakayoshi = nakayoshi+1;
        }else{}
    }
    console.log(nakayoshi);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
  input = input.split("\n");
  var arr = input[1].split(" ").map(Number);
  var sum = 0;
  for(var i=0;i<arr.length;i++){
  if(arr[arr[i]-1] == i+1) sum++;
  }
  console.log(sum/2);
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


// inputに入力データ全体が入る
function Main(input) {
	console.log(input.replace(/.{4}/, s=>`${s} `));
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

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

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}

func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}

func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}

func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}

func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}

func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0

	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 2
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}

	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}

func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	s := getNextString(scanner)
	fmt.Fprintln(writer, fmt.Sprintf("%s %s", s[0:4], s[4:]))
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

const (
	initialBufSize = 1e4
	maxBufSize     = 1e6 + 7
)

var buf []byte = make([]byte, maxBufSize)
var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBufSize)
}

func main() {
	s := nextLine()
	fmt.Println(s[:4] + " " + s[4:])
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}


package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)

	fmt.Println(s[:4] + " " + s[4:])
}


///
// File:  a.go
// Author: ymiyamoto
//
// Created on Wed Apr 25 08:30:38 2018
//
package main

import (
	"fmt"
)

var s string

func main() {
	fmt.Scan(&s)
	for i := range s {
		fmt.Print(string(s[i]))
		if i == 4 {
			fmt.Print(" ")
		}
	}
	fmt.Println()
}


package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

// An Item is something we manage in a priority queue.
type Item struct {
	//value    string // The value of the item; arbitrary.
	word     string
	weight   [2]int64
	priority int // The priority of the item in the queue.
	// The index is needed by update and is maintained by the heap.Interface methods.
	//index int // The index of the item in the heap.
}

// A PriorityQueue implements heap.Interface and holds Items.
type PriorityQueue []*Item

func (pq PriorityQueue) Len() int { return len(pq) }

func (pq PriorityQueue) Less(i, j int) bool {
	// We want Pop to give us the highest, not lowest, priority so we use greater than here.
	return pq[i].priority < pq[j].priority
}

func (pq PriorityQueue) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	//pq[i].index = i
	//pq[j].index = j
}

func (pq *PriorityQueue) Push(x interface{}) {
	//n := len(*pq)
	item := x.(*Item)
	//item.index = n
	*pq = append(*pq, item)
}

func (pq *PriorityQueue) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	//item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func nextInt() int64 {
	var i int64
	var e error
	for {
		sc.Scan()
		k := sc.Text()
		//re, _ := regexp.Compile(`\d{1,100}`)
		//t := re.FindAllStringSubmatch(k, -1)
		//k = t[0][0]
		//k = strings.TrimSpace(k)
		i, e = strconv.ParseInt(k, 10, 64)
		if e == nil {
			break
		}
	}
	return i
}
func bool2int(b bool) int {
	if b {
		return 1
	}
	return 0
}

func abs(a int64, b int64) int64 {
	if a < b {
		return b - a
	} else {
		return a - b
	}
}

func main() {
	sc.Split(bufio.ScanWords)
	r := nextInt()
	c := nextInt()
	n := nextInt()
	//dary2 := make([]bool, h)
	//fmt.Println(dary2[0])
	dary := make([][]bool, 3)
	for i := range dary {
		dary[i] = make([]bool, 3)
	}
	m := map[[2]int64]int64{}
	kk := map[[2]int64]int{}
	ans := true

	for i := int64(0); i < n; i++ {
		x := nextInt() - 1
		y := nextInt() - 1
		a := nextInt()
		//dary[a-1][b-1] = 1
		//m[b-1] = append(m[b-1], a-1)
		m[[2]int64{x, y}] = a
		for j := x - 1; j <= x; j++ {
			for k := y - 1; k <= y; k++ {
				if !(j < 0 || j > r-2 || k < 0 || k > c-2) {
					kk[[2]int64{j, k}] += 1
				}
			}
		}
	}
	pqs := len(kk)
	pq := make(PriorityQueue, pqs)
	pqi := 0
	for k, v := range kk {
		//priority := strings.Index(s, colors[i])
		pq[pqi] = &Item{
			weight:   k,
			priority: v,
		}
		pqi++
	}

	heap.Init(&pq)
	q := make([]int64, 4)
	ok := make([]bool, 4)
	pairtate := map[int64][2]int64{}
	pairyoko := map[int64][2]int64{}
	for {
		if pq.Len() == 0 {
			break
		}
		item := heap.Pop(&pq).(*Item)
		k := item.weight
		q[0], ok[0] = m[k]
		q[1], ok[1] = m[[2]int64{k[0], k[1] + 1}]
		q[2], ok[2] = m[[2]int64{k[0] + 1, k[1]}]
		q[3], ok[3] = m[[2]int64{k[0] + 1, k[1] + 1}]
		boolsum := 0
		intsum := int64(0)
		for i := 0; i < 4; i++ {
			boolsum += bool2int(ok[i])
			intsum += q[i]
		}
		if boolsum == 4 {
			if q[0]+q[3] != q[1]+q[2] {
				ans = false
			}
		} else if boolsum == 3 {
			x := k[0]
			y := k[1]
			ans2 := (q[0] + q[3]) - (q[1] + q[2])
			if !ok[2] || !ok[1] {
				ans2 = -ans2 // (q[0] + q[3]) - (q[1] + q[2])
			}
			if !ok[1] || !ok[3] {
				y += 1
			}
			if !ok[2] || !ok[3] {
				x += 1
			}
			if ans2 > 0 {
				ans = false
			}
			m[[2]int64{x, y}] = -ans2 //((q[0] + q[3]), (q[1] + q[2]))
			for j := x - 1; j <= x; j++ {
				for k := y - 1; k <= y; k++ {
					if !(j < 0 || j > r-2 || k < 0 || k > c-2) {
						if kk[[2]int64{j, k}] == 0 {
							item := Item{
								weight:   [2]int64{j, k},
								priority: kk[[2]int64{j, k}] + 1,
							}
							pt := &item
							heap.Push(&pq, pt)
						}
						//kk[[2]int64{j, k}] += 1
					}
				}
			}
		} else if boolsum == 2 {
			x := k[0]
			y := k[1]
			if !ok[0] && !ok[1] {
				p, ok := pairyoko[x]
				if ok {
					if p[0]+q[3] != p[1]+q[2] {
						ans = false
					}
				} else {
					pairyoko[x] = [2]int64{q[2], q[3]}
				}

				m[[2]int64{x, y}] = q[2]     //((q[0] + q[3]), (q[1] + q[2]))
				m[[2]int64{x, y + 1}] = q[3] //((q[0] + q[3]), (q[1] + q[2]))
			} else if !ok[0] && !ok[2] {
				p, ok := pairtate[x]
				if ok {
					if p[0]+q[3] != q[1]+p[1] {
						ans = false
					}
				} else {
					pairtate[y] = [2]int64{q[1], q[3]}
				}
				m[[2]int64{x, y}] = q[1]     //((q[0] + q[3]), (q[1] + q[2]))
				m[[2]int64{x + 1, y}] = q[3] //((q[0] + q[3]), (q[1] + q[2]))
			} else if !ok[2] && !ok[3] {
				p, ok := pairyoko[x]
				if ok {
					if p[1]+q[0] != q[1]+p[0] {
						ans = false
					}
				} else {
					pairyoko[x] = [2]int64{q[0], q[1]}
				}
				m[[2]int64{x + 1, y}] = q[0]     //((q[0] + q[3]), (q[1] + q[2]))
				m[[2]int64{x + 1, y + 1}] = q[1] //((q[0] + q[3]), (q[1] + q[2]))
			} else if !ok[1] && !ok[3] {
				p, ok := pairtate[x]
				if ok {
					if p[1]+q[0] != q[2]+p[0] {
						ans = false
					}
				} else {

					pairtate[y] = [2]int64{q[0], q[2]}
				}
				m[[2]int64{x, y + 1}] = q[0]     //((q[0] + q[3]), (q[1] + q[2]))
				m[[2]int64{x + 1, y + 1}] = q[2] //((q[0] + q[3]), (q[1] + q[2]))
			}
			/*
				if !(j < 0 || j > r-2 || k < 0 || k > c-2) {
					if kk[[2]int64{j, k}] == 0 {
						item := Item{
							weight:   [2]int64{j, k},
							priority: kk[[2]int64{j, k}] + 1,
						}
						pt := &item
						heap.Push(&pq, pt)
					}
				}
				if !(l < 0 || l > r-2 || v < 0 || v > c-2) {
					if kk[[2]int64{l, v}] == 0 {
						item := Item{
							weight:   [2]int64{l, v},
							priority: kk[[2]int64{l, v}] + 1,
						}
						pt := &item
						heap.Push(&pq, pt)
					}
				}*/
		}
		//fmt.Println(q, boolsum, m)
	}
	if ans {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}

}


package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
    sc.Scan()
    i, e := strconv.Atoi(sc.Text())
    if e != nil {
        panic(e)
    }
    return i
}

func main() {
	sc.Split(bufio.ScanWords)
	count := nextInt()
	a := make([]int, count)
	for i := 0; i < count; i ++ {
		a[i] = nextInt()
	}
	pairCount := 0
	for index, j := range a {
		if index + 1 == a[j - 1]  && index < j {
			pairCount ++
		}
	}
	fmt.Println(pairCount)
}


s=gets.chomp
puts s[0,4]+" "+s[4,8]


puts gets.chomp.insert(4, " ")


#input of int(split by space)
def get_i()
  return gets.chomp.split(" ").map(&:to_i)
end
#input of float(split by space)
def get_f()
  return gets.chomp.split(" ").map(&:to_f)
end
#input of string(split by space)
def get()
  return gets.chomp.split(" ")
end
#input of string(split per one character)
def get_nsp()
  return gets.chomp.split("")
end
#yes or no decision
def yn_judge(bool,y="Yes",n="No")
  return bool ? y : n
end
#create of array
def array(size1,init=nil,size2=-1)
  if size2==-1
    return Array.new(size1){init}
  else
    return Array.new(size2){Array.new(size1){init}}
  end
end

def max(a,b)
    return a>b ? a : b
end

def min(a,b)
    return a>b ? b : a
end

INF=Float::INFINITY

S=get_nsp
S.insert(4," ")
puts S.join("")