jiahuimbzuai/CoQuIR huggingface dataset:
//  [rust]
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");
    }

}
//  [rust]
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");
    }
    
}
//  [rust]
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);
  	
  
}
//  [rust]
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);
  	
  
}
//  [swift]
let i=readLine()!.characters.split(" ").map{Int(String($0))!}.sort();print(i==[5,5,7] ?"YES":"NO")
//  [swift]
let i=readLine()!.characters.split(" ").map{Int(String($0))!}.sort();
print(i==[5,5,7] ?"YES":"NO")
//  [swift]
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")
//  [swift]
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")
//  [swift]
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")
//  [swift]
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")
//  [typescript]
"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'));
//  [typescript]
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'));
//  [typescript]
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')
//  [typescript]
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')}
//  [typescript]
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')
}
//  [typescript]
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')
}
//  [python]
a,b = map(int,input().split())
print( max( a + b , a + a - 1 , b + b - 1 ))
//  [python]
a, b = map(int, input().split())
print(max(a+a-1, b+b-1, a+b))
//  [python]
a, b = map(int, input().split())

print(max(2 * a - 1, a + b, 2 * b - 1))
//  [python]
A, B = map(int,input().split())
def ma(A, B):
    x = max(A, B)
    ans = 2 * x - 1
    return ans
print(ma(A, B))
//  [python]
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)
//  [python]
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)
//  [java]
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;
  }

}
//  [java]
#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";
}
}
//  [java]
#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;
}
//  [java]
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);





}
}
//  [cpp]
#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);
	}
}
//  [cpp]
#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;
}
//  [cpp]
#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;
  

}
//  [cpp]
#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;
}
//  [cpp]
#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;
}
//  [cpp]
#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;
}
//  [c]
#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;
}
//  [c]
#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);
}
//  [c]
#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;
}
//  [c]
#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;
}
//  [c]
#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;
    }
}
//  [c]
#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;
}
//  [javascript]
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'));
//  [javascript]
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'));
//  [javascript]
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'));
//  [javascript]
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"))
//  [javascript]
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'));
//  [javascript]
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"));
//  [go]
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)
	}
}
//  [go]
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)
}
//  [go]
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)
}
//  [go]
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)

}
//  [go]
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
}
//  [ruby]
a,b=gets.split.map(&:to_i);
p a==b ? a*2 : [a,b].max+[a,b].max-1
//  [ruby]
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
//  [ruby]
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]
//  [ruby]
a,b = gets.chomp.split(' ').map(&:to_i)
puts [2*a -1, 2*b-1,a+b].min
//  [ruby]
a,b=gets.split.map(&:to_i).sort
p a==b ?2*a:[a..b][-2,2].sum
//  [ruby]
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
//  [rust]
#![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);
}
//  [rust]
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);
}
//  [rust]
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()
}
//  [rust]
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);
}
//  [rust]
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)
}
//  [rust]
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)));
}
//  [swift]
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 )
}
//  [swift]
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)
//  [swift]
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)
//  [swift]
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)
//  [typescript]
((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'));
//  [typescript]
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());
//  [typescript]
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"));
//  [typescript]
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
}
//  [python]
S = input()
print(S[:4] + ' ' +S[4:])
//  [python]
s=input();print(s[:4]+' '+s[-8:])
//  [python]
s = input()
print(s[:4] + " " + s[4:])
//  [python]
`r`````````````````. ````````@|@|@|@|@|@|@|@|@|@|@|@|i
//  [python]
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)
//  [python]
a = list(input())

for i in range(len(a)):
    print(a[i], end = "")
    if i == 3:
        print(" ", end = "")
        i -= 1
//  [java]
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);
		}
	}

}
//  [java]
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
}
//  [java]
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());
	}
}
//  [java]
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());
	}
}
//  [cpp]
#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;
}
//  [cpp]
#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;
}
//  [cpp]
#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;
}
//  [cpp]
#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";
}
//  [cpp]
#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;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    cin >> s;
    printf("%s %s",s.substr(0,4),s.substr(4));
}
//  [c]
#include<stdio.h>

int main()
{
  char s[13];

  scanf("%s", s);

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

  return 0;
}
//  [c]
#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);
}
//  [c]
#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;
}
//  [c]
#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]);
	
}
//  [c]
#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");
}
//  [c]
#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++;
  }
}
//  [javascript]
'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'))
//  [javascript]
function Main(input) {
	input = input.split("");
	input.splice(4,0," ");
	console.log(input.join(""))
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]
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"));
//  [javascript]
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"));
//  [javascript]
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());
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	console.log(input.replace(/.{4}/, s=>`${s} `));
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
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:]))
}
//  [go]
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()
}
//  [go]
package main

import "fmt"

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

	fmt.Println(s[:4] + " " + s[4:])
}
//  [go]
///
// 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()
}
//  [go]
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)
}
//  [ruby]
s=gets.chomp
puts s[0,4]+" "+s[4,8]
//  [ruby]
puts gets.chomp.insert(4, " ")
//  [ruby]
#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("")
//  [ruby]
#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
k=gets.to_i
N=s.size
ab=("a".."z").to_a
N.times do|i|
    if s[i]!="a" and k>="z".ord-s[i].ord+1
      k-="z".ord-s[i].ord+1
      s[i]="a"
    end
end
if k>0
  s[N-1]=ab[(s[N-1].ord-"a".ord+k)%26]
end
puts s.join("")
//  [ruby]
require 'pp'

s = gets.chomp!.chars
puts "#{s[0, 4].join} #{s[4..].join}"
//  [ruby]
s=gets
puts s[0..4]+" "+s[5..11]
//  [rust]
#![allow(non_snake_case,unused_imports,dead_code)]
use std::io::Read;
use std::cmp::max;
use std::cmp::min;
use std::str::FromStr;
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::BinaryHeap;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    let mut buf_it = buf.split_whitespace();

    let S = buf_it.next().unwrap();
    
    println!("{} {}",&S[..4],&S[4..]);
}
//  [rust]
#[allow(unused_imports)]
use std::char::*;
#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;

#[allow(unused_macros)]
macro_rules! debug {($($a:expr),*) => {println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);}}
#[allow(unused_macros)]
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 ) * } } ; }
#[allow(unused_macros)]
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 ) * } } ; }
#[allow(unused_macros)]
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" ) } ; }

#[derive(PartialEq, PartialOrd)]
pub struct Total<T>(pub T);
impl<T: PartialEq> Eq for Total<T> {}
impl<T: PartialOrd> Ord for Total<T> { fn cmp(&self, other: &Total<T>) -> std::cmp::Ordering { self.0.partial_cmp(&other.0).unwrap() }}

#[allow(dead_code)]
const MAX:usize = 100006;
#[allow(dead_code)]
const INF_U32:u32 = 1 << 31;
#[allow(dead_code)]
const INF_I32:i32 = 1 << 30;
#[allow(dead_code)]
const INF_U64:u64 = 1 << 63;
#[allow(dead_code)]
const INF_I64:i64 = 1 << 62;
#[allow(dead_code)]
const MOD:i64 = 1e9 as i64 + 7;


fn main() {
    input!{s:String};
    println!("{} {}", &s[0..4], &s[4..]);
}
//  [rust]
fn read1<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn main() {
    let mut s = read1::<String>().chars().collect::<Vec<char>>();
    s.insert(4, ' ');
    println!("{}", s.iter().map(|&c| c).collect::<String>());
}
//  [rust]
fn main() {
proconio::input!{n:usize,x:[usize;n]}
println!("{}",x.iter().enumerate().filter(|&(i,&y)|x[y-1]==i+1).count()/2);
}
//  [rust]
fn read1<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn main() {
    let mut s = read1::<String>().chars().collect::<Vec<char>>();
    s.insert(4, ' ');
    println!("{}", s.iter().collect::<String>());
}
//  [swift]
let S=readLine()!.characters.map{$0}
print(String(S[0..<4]),String(S[4..<12]))
//  [swift]
import Foundation

let a = readLine() 
let str = String(UTF8String: a!)!


var mone = 0
var newString = ""
for i in str.characters {
    newString.appendContentsOf(String(i))
    if mone == 3 {
        newString.appendContentsOf(String(" "))
    }
    mone++
    
}

print(newString.uppercaseString)