jiahuimbzuai/CoQuIR huggingface dataset:
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <assert.h>
typedef int64_t ll;
typedef uint64_t ull;
int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */
#define min(a,b) (a < b ? a: b)
#define max(a,b) (a > b ? a: b)

#define MAXN (200001)
#define MOD (1000000007)

char s[MAXN+1];
int main(void)
{
    ll n;
    scanf("%ld",&n);
    scanf("%s",s);

    ll ans=1;
    for(int i=1;i<n;i++)
    {
        if(s[i]!=s[i-1]) ans++;
    }
    printf("%ld\n", ans);
    return 0;
}
//  [c]
#include<stdio.h>
int main(){
  int n,i,c=0;
  char s[100010];
  scanf("%d %s",&n,s);
  for(i=0;i<n;i++){
    if(s[i]==s[i+1])c++;
  }
  printf("%d\n",n-c);
  return 0;
}
//  [c]
#include <stdio.h>
int main(void){
  int N;
  char S[10010];
  int i;
  scanf("%d",&N);
  scanf("%s",S);
  int a=1;
  for(i=1;i<N;i++){
    if(S[i]!=S[i-1]){
      a=a+1;
    }
  }
  printf("%d",a);
  return 0;
}
//  [c]
#include <stdio.h>
int main(void){
  int N;
  char S[10010];
  int i;
  scanf("%d",&N);
  scanf("%s",S);
  int a=1;
  for(i=1;i<=N;i++){
    if(S[i]!=S[i-1]){
      a=a+1;
    }
  }
  printf("%d",a);
  return 0;
}
//  [javascript]
function main(input) {
    var s = input.split('\n')[1];
    var r = 1;
    for (var i = 1; i < s.length; i++)
        if (s[i - 1] !== s[i]) r++;
    console.log(r);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
  var lines = input.split('\n');
  var N = Number(lines[0]);
  var S = lines[1];
  var count = 0;
  var before = '';
  for (var i = 0; i < N; i ++) {
    var current = S.charAt(i);
    if (before !== current) {
      count++;
    }
    before = current;
  }
  console.log(count);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'
function main(inp) {
  inp = inp.trim().split('\n')
  const N = Number(inp.shift())
  inp = inp[0];
  
  let ans = 1
  for (let i = 1; i < N; i++) {
    if (inp[i] !== inp[i-1]) ans++
  }
  console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
    
    const reverse = (s) => {
        return s.split('').reverse().join('');
    }

    const N = reverse(input.split('\n')[0]);
    const S = reverse(input.split('\n')[1]);

    let ans = 1;
    for(let i=1;i<N;i++){
        if(S.charAt(i-1)!==S.charAt(i)) ans++;
    }

    console.log(ans);
}

// 下記必須
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
    const args = input.split('\n');
    const N = parseInt(args[0], 10),
          S = args[1];
    let s = S.split('');
    for (let i = 0; i < s.length; i++) {
        if (s[i] == s[i + 1]) s[i] = null;
    }
    console.log(s.join('').length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
  var lines = input.split('\n');
  var N = Number(lines[0]);
  var S = lines[1];
  var count = 0;
  var before = '';
  for (var i = 0; i < N; i ++) {
    var current = S.charAt(i);
    if (before !== current) {
      count++;
    }
    before = current;
  }
  console.log(count + 1);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

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

func main() {

	// reader := bufio.NewReader(os.Stdin)
	// s, _ := reader.ReadString('\n')
	// n := eAtoi(strings.TrimSpace(s))
	// count := 0
	// prev := '@'
	// for i := 0; i < n; i++ {
	// 	r, _, _ := reader.ReadRune()
	// 	if prev != r {
	// 		count++
	// 	}
	// 	prev = r
	// }
	scanner := makeScanner(200000)
	eGetInt(scanner)
	s := eGetLine(scanner)
	count := 0
	prev := '@'
	for _, r := range s {
		if prev != r {
			count++
		}
		prev = r
	}
	fmt.Println(count)
}

////////////////////////////////////////////////////////////////////////////////
// ライブラリ
////////////////////////////////////////////////////////////////////////////////
func makeScanner(maxByte int) *bufio.Scanner {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]uint8, 0, 8192), maxByte)
	return scanner
}
func makeCharScanner() *bufio.Scanner {
	scanner := makeScanner(8192)
	scanner.Split(bufio.ScanRunes)
	return scanner
}
func makeWordScanner() *bufio.Scanner {
	scanner := makeScanner(8192)
	scanner.Split(bufio.ScanWords)
	return scanner
}
func eGetLine(r *bufio.Scanner) string {
	if r.Scan() {
		return r.Text()
	}
	err := r.Err()
	if err != nil {
		log.Fatal(err)
	}
	// EOF
	return ""
}
func eGetInt(r *bufio.Scanner) int {
	line := eGetLine(r)
	return eAtoi(line)
}
func eGetInt64(r *bufio.Scanner) int64 {
	line := eGetLine(r)
	return eAtoInt64(line)
}
func eGetFields(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Fields(line)
}
func eGetInts(r *bufio.Scanner) []int {
	fields := eGetFields(r)
	ints := make([]int, len(fields))
	for i := 0; i < len(ints); i++ {
		ints[i] = eAtoi(fields[i])
	}
	return ints
}
func eGetInt64s(r *bufio.Scanner) []int64 {
	fields := eGetFields(r)
	ints := make([]int64, len(fields))
	for i := 0; i < len(ints); i++ {
		ints[i] = eAtoInt64(fields[i])
	}
	return ints
}
func eGetChars(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Split(line, "")
}
func eAtoi(s string) int {
	n, err := strconv.Atoi(s)
	if err != nil {
		log.Fatal(err)
	}
	return n
}
func eAtoInt64(s string) int64 {
	n, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		log.Fatal(err)
	}
	return n
}
//  [go]
package main
 
import (
  "bufio"
  "os"
  "strconv"
  "fmt"
)
 
var reader = bufio.NewReaderSize(os.Stdin, 1000000)
var writer = bufio.NewWriter(os.Stdout)
func NextLine() string {
  var line, buffer []byte
  var isPrefix bool = true
  var err error
  for isPrefix {
    line, isPrefix, err = reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer, line...)
  }
  return string(buffer)
}
func NextInt() int {
  var n int
  n, _ = strconv.Atoi(NextLine())
  return n
}
func Write(s interface{}) {
  fmt.Fprintln(writer, s)
}
func Output() {
  _ = writer.Flush()
}

func main() {
  N := NextInt()
  S := NextLine()
  pre := ' '
  cnt := N - N
  for _, s := range S {
    if s != pre {
      pre = s
      cnt++
    }
  }
  Write(cnt)
  Output()
}
//  [go]
package main
 
import (
	"fmt"
	//"math"
)
 
var S string
var ANS int
func main() {
	fmt.Scan(&S)
	s := string(0) 
	for i := 0; i < len(S); i++ {
		v := S[i:i+1]
		if s != v {
			ANS++
			s = v
		}
	}
	fmt.Println(ANS)
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

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

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

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

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func main() {
	sc.Split(bufio.ScanWords)
	n := readInt()
	s := []byte(readString())

	count := 1
	for i := 0; i < n-1; i++ {
		if s[i] != s[i+1] {
			count++
		}
	}
	fmt.Println(count)
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

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

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

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

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func main() {
	sc.Split(bufio.ScanWords)
	n := readInt()
	s := readString()

	count := 1
	for i := 0; i < n-1; i++ {
		if s[i] != s[i+1] {
			count++
		}
	}
	fmt.Println(count)
}
//  [ruby]
n = gets.to_i
s = gets.chomp

puts s.squeeze.length
//  [ruby]
gets.to_i
s = gets.chomp
puts s.squeeze.size
//  [ruby]
N = gets.to_i
S = gets.chomp

puts S.squeeze.size
//  [ruby]
n = gets.chomp.to_i
s = gets.chomp.split("")
i = 0
kazu = n
arr = [s[0]]
while true
    if s[i] == s[i+1]
        kazu = kazu - 1
    end
    if i == n - 2
        break
    end
    i += 1
end
puts kazu
//  [ruby]
n = gets.chomp.to_i
s = gets.chomp.split("")
i = 0
arr = [s[0]]
while true
    if s[i] != s[i+1]
        arr << s[i+1]
    end
    if i == n - 2
        break
    end
    i += 1
end
puts arr.size
//  [ruby]
s = gets.chomp.to_i

ans = 1
s.each do |i|
    if s[0] != i
        ans += 1
        s[0] = i
    end
end

puts ans
//  [rust]
fn main() {
    let n = read::<usize>();
    let s = read::<String>();
    let s: Vec<char> = s.chars().into_iter().collect();
    let mut ret = 0;
    for i in 0..n {
        if i == 0 {
            ret += 1;
            continue;
        }

        if s[i-1] == s[i] {
            continue;
        }

        ret += 1;
    }

    println!("{}", ret);
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().parse().ok().unwrap()
}
//  [rust]
fn read<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 n = read::<usize>();
    let s = read::<String>();
    let s = s.chars().collect::<Vec<_>>();

    let mut prev = '.';
    let mut count = 0;
    for &c in s.iter() {
        if prev != c {
            prev = c;
            count += 1;
        }
    }

    println!("{}", count);
}
//  [rust]
#[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
#[allow(dead_code)]
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
#[allow(dead_code)]
fn yn(result: bool) {
    if result {
        println!("Yes");
    } else {
        println!("No");
    }
}

fn main() {
    let n = read::<usize>();
    let s = read::<String>().chars().collect::<Vec<char>>();

    let mut v: Vec<char> = vec![];
    let mut lastchar = ' ';
    for i in 0..n {
        let c = s[i];
        if i !=0 && lastchar != c {
            v.push(c);
            lastchar = c;
        }
    }
    println!("{}", v.len());
}
//  [rust]
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main(){
    let _: i32 = read();
    let s: String = read();

    let mut last_char = 'A';
    let mut ans: i32 = 0;
    s.chars().for_each(|c| if c != last_char { ans += 1; last_char = c; } );

    println!("{}", ans);
}
//  [swift]
let N = Int(readLine()!)!
let S = readLine()!.characters
var pre: Character = "_"
var ans = 0
for c in S {
  ans += (c == pre ? 0 : 1)
  pre = c
}
print(ans)
//  [swift]
// 🐋💭 Walk on Multiplication Table
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}
// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

func main() {
    let n = readInt()
    let aryS = readLine()!.map { String($0) }
    var ans = n
    for i in 1..<n {
        if aryS[i - 1] == aryS[i] {
            ans -= 1
        }
    }
    print(ans)
}
main()
//  [swift]
readLine()
var ans=0,pre:Character="_"
readLine()!.characters.map{
  ans+=($0==pre ?0:1)
  pre=$0
}
print(ans)
//  [swift]
// 🐋💭 Walk on Multiplication Table
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}
// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

func main() {
    let n = readInt()
    let aryS = readLine()!.map { String($0) }
    var SCount = 0
    var ans = n
    for i in 1..<n {
        if aryS[i - 1] == aryS[i] {
            SCount += 1
        } else if SCount > 0 {
            ans -= SCount
            SCount = 0
        }
    }
    print(ans)
}
main()
//  [swift]
// 🐋💭 Walk on Multiplication Table
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}
// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

func main() {
    let n = readInt()
    let aryS = readLine()!.map { String($0) }
    var SCount = 0
    var ans = n
    for i in 1..<n {
        print(aryS[i - 1],aryS[i])
        if aryS[i - 1] == aryS[i] {
            SCount += 1
        } else if SCount > 0 {
            ans -= SCount
            SCount = 0
        }
    }
    print(ans)
}
main()
//  [typescript]
import * as fs from "fs";

const input = fs.readFileSync("/dev/stdin", "utf8").split(/\n/);
const N: number = +input[0];
const strings = input[1];
let count = 0;
for (let i = 0; i < N; i++) {
  if (strings[i] !== strings[i + 1]) {
    count++;
  }
}
console.log(count);
//  [typescript]
const main = (input) => {
  const [nStr, s] = input.split('\n')
  const n = Number(nStr)
  let result = 1
  for (let i = 1; i < n; i++) {
    const pre = s[i-1]
    const char = s[i]
    if (pre !== char) result++
  }
  console.log(result)
  
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);const tn=():number=>{const a=input[0];input.shift();return Number(a)};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{const a=input[0];input.shift();return String(a)};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const tc=():string=>{let a=input[0].split('');const b=a[0];a.shift();if(a.length>0){input[0]=a.join('')}else{input.shift()}return String(b)};const tcc=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(tc())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const ceil=(a)=>{return Math.ceil(a)};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1];}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const gojo=(a:number,b:number):number=>{if(a%b===0)return b;return gojo(b,a%b)};const deduplicate=(a:number[])=>{return Array.from(new Set(a))};const permutation=(arr,n)=>{var arrs,i,j,zensu,results,parts;arrs=[];zensu=arr.length;if(zensu<n){return}else if(n==1){for(i=0;i<zensu;i++){arrs[i]=[arr[i]]}}else{for(i=0;i<zensu;i++){parts=arr.slice(0);parts.splice(i,1)[0];results=permutation(parts,n-1);for(j=0;j<results.length;j++){arrs.push([arr[i]].concat(results[j]))}}}return arrs}
const main=()=>{
  let n=tn(),ans=0
  let sr=ts()
  let b=null
  for(let i=0;i<n;i++){
    let s=sr[i]
    ans+=s!=b?1:0
    b=s
  }
  to(ans)
}
main()
//  [typescript]
import * as fs from "fs";

function main(lines: string[][]) {
  const slimes = lines[1][0].split("");
  const unique = (data: string[]): string[] => {
    return data.reduce((prev, cur) => {
      if (prev[prev.length - 1] !== cur) {
        return prev.concat(cur);
      } else {
        return prev;
      }
    }, []);
  };
  const uniqueData = unique(slimes);
  console.log(uniqueData.length);
}

const lines = fs
  .readFileSync("/dev/stdin", "utf8")
  .split("\n")
  .map((l) => l.split(" "))
  .filter((input) => !(input.length === 1 && input[0] === ""));

main(lines);
//  [typescript]
import * as fs from "fs";

function main(lines: string[][]) {
  const slimes = lines[1][0].split("");
  const unique = (data: string[]): { uniqueData: string[]; removed: boolean } => {
    let removed = false;
    let latest = "";
    const uniqueData = data.reduce((prev, cur) => {
      if (latest !== cur) {
        latest = cur;
        return prev.concat(cur);
      } else {
        removed = true;
        latest = cur;
        return prev;
      }
    }, []);

    if (removed) {
      const reRemoved = unique(uniqueData);
      return { uniqueData: reRemoved.uniqueData, removed: reRemoved.removed };
    }
    return { uniqueData, removed };
  };
  const { uniqueData, removed } = unique(slimes);
  console.log(uniqueData.length);
}

const lines = fs
  .readFileSync("/dev/stdin", "utf8")
  .split("\n")
  .map((l) => l.split(" "))
  .filter((input) => !(input.length === 1 && input[0] === ""));

main(lines);
//  [typescript]
import * as fs from "fs";

const input = fs.readFileSync("/dev/stdin", "utf8").split(/\n/);
const N: number = +input[0];
const strings = input[1].split(" ");
let count = 0;
for (let i = 0; i < N; i++) {
  if (strings[i] !== strings[i + 1]) {
    count++;
  }
}
console.log(count);
//  [python]
X1, Y1, X2, Y2 = map(int, input().split())
X3, Y3 = X2-(Y2-Y1), Y2+(X2-X1)
X4, Y4 = X3-(Y3-Y2), Y3+(X3-X2)
print(X3, Y3, X4, Y4)
//  [python]
x1,y1,x2,y2=map(int,input().split())

xd= x2-x1
yd= y2-y1

x3 = x2 - yd
y3 = y2 + xd
x4 = x1 - yd
y4 = y1 + xd

print(x3,y3,x4,y4)
//  [python]
# coding: utf-8


def main():
    x1, y1, x2, y2 = map(int, input().split())
    x_diff = x2 - x1
    y_diff = y2 - y1

    x3 = x2 - y_diff
    y3 = y2 + x_diff

    x4 = x1 - y_diff
    y4 = y1 + x_diff

    print('{} {} {} {}'.format(x3, y3, x4, y4))


if __name__ == '__main__':
    main()
//  [python]
import sys
from collections import deque
import math
#sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def array(n,val=0):
    return [val]*n
def matrix(row,columns,val):
    return [[val]*columns for _ in range(row)]

def solve():
    dx = x2-x1
    dy = y2-y1
    x3 = x2-dy
    y3 = y2+dy
    x4 = x1-dy
    y4 = y1+dx
    print(x3,y3,x4,y4)
    return

if __name__=='__main__':
    x1,y1,x2,y2 = IL()
    solve()
//  [python]
import sys
from collections import deque
import math
#sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def array(n,val=0):
    return [val]*n
def matrix(row,columns,val):
    return [[val]*columns for _ in range(row)]

def solve():
    points = sorted(a, key=lambda x: (x[1],-x[0]))
    dx = points[0][0]-points[1][0]
    dy = points[0][1]-points[1][1]
    x3 = points[1][0] + dy
    y3 = points[1][1] - dx
    x4 = points[0][0] + dy
    y4 = points[0][1] - dx
    if points != a:
        x3,x4,y3,y4 = x4,x3,y4,y3
    print(x3,y3,x4,y4)
    return

if __name__=='__main__':
    x1,y1,x2,y2 = IL()
    a = [[x1,y1],[x2,y2]]
    solve()
//  [python]
import sys
from collections import deque
import math
#sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def array(n,val=0):
    return [val]*n
def matrix(row,columns,val):
    return [[val]*columns for _ in range(row)]

def solve():
    points = sorted(a, key=lambda x: (x[1],-x[0]))
    dx = points[0][0]-points[1][0]
    dy = points[0][1]-points[1][1]
    x3 = points[1][0] + dy
    y3 = points[1][1] - dx
    x4 = points[0][0] + dy
    y4 = points[0][1] - dx
    print(points,a)
    if points != a:
        x3,x4,y3,y4 = x4,x3,y4,y3
    print(x3,y3,x4,y4)
    return

if __name__=='__main__':
    x1,y1,x2,y2 = IL()
    a = [[x1,y1],[x2,y2]]
    solve()
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		int x1 = Integer.parseInt(sa[0]);
		int y1 = Integer.parseInt(sa[1]);
		int x2 = Integer.parseInt(sa[2]);
		int y2 = Integer.parseInt(sa[3]);
		br.close();

		int x3 = x2 + y1 - y2;
		int y3 = y2 + x2 - x1;
		int x4 = x3 + x1 - x2;
		int y4 = y3 + y1 - y2;
		System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
	}
}
//  [java]
package abc108_b;

import java.util.Scanner;

class abc108_b {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] input = {0,0,0,0};
        for (int i = 0; i < input.length;i++) {
            input[i] = scan.nextInt(); // x_1,y_1,x_2,y_2
        }
        scan.close();
        int[][] position = {{0,0},{0,0},{0,0},{0,0}};
        position[0][0] = input[0];
        position[0][1] = input[1];
        position[1][0] = input[2];
        position[1][1] = input[3];
        position[2] = revpos(position[0],position[1]);
        position[3] = revpos(position[1], position[2]);
        if (position[0] == revpos(position[2], position[3])) {
            System.out.println("OK");
        }
        int[] output={0,0,0,0};
        output[0] = position[2][0];
        output[1] = position[2][1];
        output[2] = position[3][0];
        output[3] = position[3][1];
        for (int i : output) {
            System.out.println(i);
        }
    }
    public static int[] revpos(int[] p,int[] q) {//pos 1 pos 2
        int[] vec = {0,0};
        for (int i = 0; i < vec.length; i++) {
            vec[i] = p[i] - q[i];
        }
        int tmp = 0;
        tmp = vec[0];
        vec[0] = vec[1];
        vec[1] = -tmp;
        int[] newpos = {0,0};
        for (int i = 0; i < newpos.length; i++) {
            newpos[i] = q[i] + vec[i];
        }
        return newpos;
    }
}
//  [java]

class abc108_b {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] input = {0,0,0,0};
        for (int i = 0; i < input.length;i++) {
            input[i] = scan.nextInt(); // x_1,y_1,x_2,y_2
        }
        scan.close();
        int[][] position = {{0,0},{0,0},{0,0},{0,0}};
        position[0][0] = input[0];
        position[0][1] = input[1];
        position[1][0] = input[2];
        position[1][1] = input[3];
        position[2] = revpos(position[0],position[1]);
        position[3] = revpos(position[1], position[2]);
        if (position[0] == revpos(position[2], position[3])) {
            System.out.println("OK");
        }
        int[] output={0,0,0,0};
        output[0] = position[2][0];
        output[1] = position[2][1];
        output[2] = position[3][0];
        output[3] = position[3][1];
        for (int i : output) {
            System.out.println(i);
        }
    }
    public static int[] revpos(int[] p,int[] q) {//pos 1 pos 2
        int[] vec = {0,0};
        for (int i = 0; i < vec.length; i++) {
            vec[i] = p[i] - q[i];
        }
        int tmp = 0;
        tmp = vec[0];
        vec[0] = vec[1];
        vec[1] = -tmp;
        int[] newpos = {0,0};
        for (int i = 0; i < newpos.length; i++) {
            newpos[i] = q[i] + vec[i];
        }
        return newpos;
    }
}
//  [cpp]
#include <cstdio>
#define rg register
using namespace std;
typedef long long ll;
template <typename Tp> inline int getmin(Tp &x,Tp y){return y<x?x=y,1:0;}
template <typename Tp> inline int getmax(Tp &x,Tp y){return y>x?x=y,1:0;}
template <typename Tp> inline void read(Tp &x)
{
	x=0;int f=0;char ch=getchar();
	while(ch!='-'&&(ch<'0'||ch>'9')) ch=getchar();
	if(ch=='-') f=1,ch=getchar();
	while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar();
	if(f) x=-x;
}
int x1,y1,x2,y2,a,b;
int main()
{
	read(x1);read(y1);read(x2);read(y2);
	a=x2-x1;b=y2-y1;
	printf("%d %d %d %d\n",x2-b,y2+a,x2-a-b,y2+a-b);
	return 0;
}
//  [cpp]
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <unordered_map>
#include <utility>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <math.h>
#include <stdio.h>
#include <deque>

using namespace std;

#define REP(i,n,m) for( long long int i = (n); i < (m); i++ )
#define REV(v) for (auto itr = v.rbegin(); itr != v.rend(); itr++)
#define ll long long
#define ALL(a) (a).begin(), (a).end()
#define SORT(v) sort( ALL(v) );
#define LAST(v) v[v.size()-1]
#define ZERO(a) memset(a,0,sizeof(a));
#define MINUS(a) memset(a,-1,sizeof(a));
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define pi pair<int, int>
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define IIN(a) int a; cin >> a;
#define LIN(a) ll a; cin >> a;
#define SIN(a) string a; cin >> a;
#define VL(v,n) vector<ll> v(n);
#define Read_VL(v,n) vector<ll> v(n);REP(i,0,n)cin>>v[i];
#define sumV(v,n) Vl(acm,n) REP(i,0,n) acm[i] = v[i] + ( i == 0 ? 0 : acm[i - 1]);
#define EPS (1e-10)
#define INF 1000000000000LL

void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}

template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}

template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}


template<class T=ll>struct Graph{
	int n;
	vector<vector<tuple<ll,T>>>edge;
	Graph(int N=1):n(N){edge.resize(n);}
	void add(ll f,ll t,T c,bool d=false){
		edge[f].emplace_back(t,c);
		if(!d)edge[t].emplace_back(f,c);
	}
	void view(){
		REP(i,0,n)for(auto&e:edge[i])
			puta(i,"=>",get<0>(e),", cost :",get<1>(e));
	}
};


bool length_cmp( string &a, string &b ){
  return a.size() < b.size();
}

ll StoLL( string s )
{
	ll num=0;
  REP( i, 0, s.size() ){
    num = num * 10 + ( s[i] ^ 48 );
  }
  return num;
}

ll CtoLL( char c )
{
	if( 'a' <= c && c <= 'z'){
		return (ll)( c ^ 96 ) ;
	}
	else if( 'A' <= c && c <= 'Z'){
		return (ll)( c ^ 64 );
	}
  return 0;
}

ll MOD=1000000007;
ll dx[4] = { 1, 0, -1, 0 };
ll dy[4] = { 0, 1, 0, -1 };
//I ASCII code: '0' = 48; 'A' = 65; 'a' = 97

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    LIN(x1)LIN(y1)LIN(x2)LIN(y2)
    ll dx = x2 - x1, dy = y2 - y1;
    ll x3 = x2 - dy, y3 = y2 + dx;
    ll x4 = x1 - dy, y4 = y1 + dx;
    puta( x3,y3,x4,y4 );
    return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int x1,y1,x2,y2;
    cin>>x1>>y1>>x2>>y2;
    if(x2>=x1)
    cout<<x2-abs(y1-y2)<<" "<<y2+abs(x1-x2)<<" "<<x1-abs(y1-y2)<<" "<<y1+abs(x1-x2)<<"\n";
    else
    {
        cout<<x2-abs(y1-y2)<<" "<<y2-abs(x1-x2)<<" "<<x1-abs(y1-y2)<<" "<<y1-abs(x1-x2)<<"\n";
    }
    
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int x1,y1,x2,y2;
    cin>>x1>>y1>>x2>>y2;
    cout<<x2-abs(y1-y2)<<" "<<y2+abs(x1-x2)<<" "<<x1-abs(y1-y2)<<" "<<y1+abs(x1-x2)<<"\n";
}
//  [cpp]
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <bitset>
#include <iomanip>
#include <stack>
#include <list>
#include <map>
#include <unordered_map>
#include <chrono>
#include <numeric>
using namespace std;
using ll = long long;
const ll INF = (ll)1e18+1;
const ll DIV = 1000000007;
//#define TEST
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
#ifdef TEST
    chrono::system_clock::time_point start, end;
    start = chrono::system_clock::now();
#endif
    long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    ll x = (x2-x1);
    ll y = (y2-y1);
    ll x3,y3, x4, y4;
    if(abs(x) > abs(y))
    {
        if(x > 0)
        {
            cerr << "1" << endl;
            x3 = x2 - y;
            y3 = y2 + x;
            x4 = x3 - x;
            y4 = y3 - y;
        }
        else
        {
            cerr << "2" << endl;
            x3 = x2 - y;
            y3 = y2 + x;
            x4 = x3 - x;
            y4 = y3 - y;
        }
    }
    else
    {
        if(y > 0)
        {
            cerr << "3" << endl;
            x3 = x2 - y;
            y3 = y2 + x;
            x4 = x3 - x;
            y4 = y3 - y;
        }
        else
        {
            cerr << "4" << endl;
            x3 = x2 - y;
            y3 = y2 + x;
            x4 = x3 + x;
            y4 = y3 - y;
        }
    }
    cout << x3 << " " << y3 << " " << x4 << " " << y4 << endl;
#ifdef TEST
    end = chrono::system_clock::now();
    cerr << static_cast<double>(chrono::duration_cast<chrono::microseconds>(end - start).count() / 1000.0) << "[ms]" << endl;
#endif
    return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int x1,y1,x2,y2;
  scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
  int x3,y3,x4,y4;
  x3 = x2-y2+y1;
  x4 = x1-y2+y1;
  y3 = y2+x2-x1;
  y4 = y1+x2-x1;
  printf("%d %d %d %d\n",x3,y3,x4,y4);

  return 0;
}
//  [c]
#include<stdio.h>
int main(){
  int x1,x2,x3,x4,y1,y2,y3,y4;
  scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
  x3=x2+y1-y2;
  y3=y2+x2-x1;
  x4=x1+y1-y2;
  y4=y1+x2-x1;
  printf("%d %d %d %d\n",x3,y3,x4,y4);
  return 0;
}
//  [c]
#include<stdio.h>
 
int main(void){
	int x1,x2,x3,x4,y1,y2,y3,y4,henx,heny;

	scanf("%d %d %d %d",&x1,&y1,&x2,&y2);
	
	henx = x2 - x1;
	heny = y2 - y1;
	y3 = y2 + henx;
	x3 = x2 - heny;
	y4 = y3 - heny;
	x4 = x3 - henx;

	printf("%d %d %d %d\n",x3,y3,x4,y4);
 
	return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
int main(void){
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    
         if(x1<=x2 && y1<=y2)printf("%d %d %d %d\n", x2-abs(y2-y1), y2+abs(x2-x1), x1-abs(y2-y1), y1+abs(x2-x1));
    else if(x1>=x2 && y1<=y2)printf("%d %d %d %d\n", x2-abs(y2-y1), y2-abs(x2-x1), x1-abs(y2-y1), y1-abs(x2-x1));
    else if(x1<=x2 && y1>=y2)printf("%d %d %d %d\n", x2+abs(y2-y1), y2+abs(x2-x1), x1+abs(y2-y1), y1+abs(x2-x1));
    else if(x1>=x2 && y1>=y2)printf("%d %d %d %d\n", x2-abs(y2-y1), y2-abs(x2-x1), x1-abs(y2-y1), y1-abs(x2-x1));
    return 0;
}
//  [c]
#include<stdio.h>
#include<bits/stdc++.h>
using namespace std ;
int main()
{
    int a , b , c , d ;
    cin>>a>>b>>c>>d;
    int x = c-a , y = d-b ;
    cout<<c-y<<" "<<d+x<<" "<<a-y<<" "<<b+x;
}
//  [c]
#include<stdio.h>
int main()
{
int x1,x2,y1,y2;
  scanf("%d %d %d %d",&x1,&x2,&y1,&y2);
  printf("%d %d %d %d",x2+(y1-y2),y2+(x2-x1),x1+(y1-y2),y1+(x2-x1));
return 0;}
//  [javascript]
function Main(input){
    const position=input.split(' ');
    const x1=Number(position[0]);
    const y1=Number(position[1]);
    const x2=Number(position[2]);
    const y2=Number(position[3]);
    const x4=x1+y1-y2;
    const y4=y1-x1+x2;
    const x3=x4+y4-y1;
    const y3=y4+x1-x4;
    console.log(x3 + ' ' + y3 + ' '+x4 +' '+y4);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'

function main(input) {
  input = input
    .trim()
    .split(' ')
    .map(Number)

  const x1 = input[0]
  const y1 = input[1]
  const x2 = input[2]
  const y2 = input[3]

  const x3 = x2 - (y2 - y1)
  const y3 = y2 + (x2 - x1)
  const x4 = x1 + (y1 - y2)
  const y4 = y1 - (x1 - x2)

  console.log([x3, y3, x4, y4].join(' '))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
l = inp.shift().split(' ')
x1 = l.shift() * 1
y1 = l.shift() * 1
x2 = l.shift() * 1
y2 = l.shift() * 1
xd = x1 - x2
yd = y1 - y2
x3 = x2 + yd
y3 = y2 - xd
x4 = x1 + yd
y4 = y1 - xd
console.log('%d %d %d %d', x3, y3, x4, y4)
//  [javascript]
inp = ["31 -41 -59 26"]
l = inp.shift().split(' ')
x1 = l.shift() * 1
y1 = l.shift() * 1
x2 = l.shift() * 1
y2 = l.shift() * 1
xd = x1 - x2
yd = y1 - y2
x3 = x2 + yd
y3 = y2 - xd
x4 = x1 + yd
y4 = y1 - xd
console.log('%d %d %d %d', x3, y3, x4, y4)
//  [javascript]
function main(input) {
  input=input.trim();
  const x1 = parseInt(input.split(" ")[0], 10);
  const y1 = parseInt(input.split(" ")[1], 10);
  const x2 = parseInt(input.split(" ")[2], 10);
  const y2 = parseInt(input.split(" ")[3], 10);
  var arr=[x2+y1-y2, y2+x2-x1, x1+y1-y2, y1+x2-x1]
  console.log(arr);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  input=input.trim();
  const x1 = parseInt(input.split(" ")[0], 10);
  const y1 = parseInt(input.split(" ")[1], 10);
  const x2 = parseInt(input.split(" ")[2], 10);
  const y2 = parseInt(input.split(" ")[3], 10);
  console.log([x2+y1-y2, y2+x2-x1, x1+y1-y2, y1+x2-x1]);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

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

const mod = 1000000007

// 1MB
const ioBufferSize = 1 * 1024 * 1024

var sc = func() *bufio.Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(make([]byte, ioBufferSize), ioBufferSize)
	sc.Split(bufio.ScanWords)
	return sc
}()

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

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

func main() {
	x1, y1, x2, y2 := nextInt(), nextInt(), nextInt(), nextInt()

	fmt.Println(x2+y1-y2, -x1+x2+y2, x1+y1-y2, -x1+x2+y1)
}
//  [go]
package main

import (
        "fmt"
)

func solution(a, b, c, d int) (x3, y3, x4, y4 int) {
        x := c - a
        y := d - b
        return c - y, d + x, a - y, b + x
}

func main() {
        var x1, y1, x2, y2 int
        fmt.Scan(&x1, &y1, &x2, &y2)
        fmt.Println(solution(x1, y1, x2, y2))
}
//  [go]
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <functional>
#include <bitset>

using namespace std;
#define int long long int
const int INF = 1001001001001001LL;
const int MOD = 1000000007;

int di[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dj[] = {0, 1, 0, -1, 1, 1, -1, -1};

signed main(){
    
    int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2;
    int a = x2 - x1;
    int b = y2 - y1;
    cout << 
    return 0;
}
//  [go]
package main

import "fmt"

func main() {
	var x1, y1, x2, y2 int
	fmt.Scan(&x1, &y1, &x2, &y2)
	v := 0
	if x1 != x2 {
		v = x1 - x2
	} else {
		v = y1 - y2
	}
	if v < 0 {
		v = -v
	}
	if x1 == x2 {
		if y1 > y2 {
			fmt.Printf("%d %d %d %d\n", x1+v, y2, x1+v, y1)
		} else {
			fmt.Printf("%d %d %d %d\n", x1-v, y2, x1-v, y1)
		}
	} else {
		if x1 < x2 {
			fmt.Printf("%d %d %d %d\n", x1, y1+v, x2, y1+v)
		} else {
			fmt.Printf("%d %d %d %d\n", x2, y1-v, x1, y1-v)
		}
	}
}
//  [go]
// Package main provides
//
// File:  b.go
// Author: ymiyamoto
//
// Created on Wed Dec  5 21:48:31 2018
//
package main

import "fmt"

var x1, x2, y1, y2 int

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func main() {
	fmt.Scan(&x1, &y1, &x2, &y2)

	if x1 < x2 {
		fmt.Println(max(x1, x2), min(y1, y2), min(x1, x2), max(y1, y2))
	} else {
		fmt.Println(min(x1, x2), max(y1, y2), max(x1, x2), min(y1, y2))
	}
}
//  [ruby]
x1,y1,x2,y2 = gets.split.map(&:to_i)
a = Math.sqrt((x1-x2)**2+(y1-y2)**2)
if x1 == x2 then
    if y1 > y2 then
        x3 = x1+a
        x4 = x3
        y3 = y2
        y4 = y1
    else
        x3 = x1-a
        x4 = x3
        y3 = y2
        y4 = y1
    end
elsif y1 == y2 then
    if x1 < x2 then
        x3 = x2
        x4 = x1
        y3 = y2 + a
        y4 = y3
    else
        x3 = x2
        x4 = x1
        y3 = y2 - a
        y4 = y3
    end
elsif x1 < x2 then
    x3 = x2 - (y2-y1)
    x4 = x1 - (y2-y1)
    y3 = y2 + (x2-x1)
    y4 = y1 + (x2-x1)
else
    x3 = x2 + (y1-y2)
    x4 = x1 + (y1-y2)
    y3 = y2 + (x2-x1)
    y4 = y1 + (x2-x1)
end
puts "#{x3.to_i} #{y3.to_i} #{x4.to_i} #{y4.to_i}"
//  [ruby]
x1, y1, x2, y2 = gets.chomp.split.map(&:to_i)

a = x2-x1
b = y2-y1

puts "#{x2-b} #{y2+a} #{x1-b} #{y1+a}"
//  [ruby]
x1, y1, x2, y2 = gets.split.map &:to_i
puts "#{x2-y2+y1} #{y2+x2-x1} #{x1-y2+y1} #{y1+x2-x1}"
//  [ruby]
a,b,c,d=gets.split.map(&:to_i)
x=c − a 
y=d − b
puts [c − y , d + x , a − y , b + x].join(' ')
//  [ruby]
x1,y1,x2,y2 = gets.strip.split.map(&:to_i)
if x1 != x2
  a = x2
  b = y2+x2-x1
  c = x1
  d = b
else
  a = x1+y1-y2
  b = y2
  c = a
  d = y1
end
puts [a,b,c,d].join(" ")
//  [ruby]
x_1, y_1, x_2, y_2 = gets.split(" ").map(&:to_i)
 
x_mount = x_2 - x_1
y_mount = y_2 - y_1
 
if x_mount > 0 && y_mount > 0 
  x_3, y_3 = x_2 - y_mount.abs, y_2 + x_mount.abs
  x_4, y_4 = x_1 - y_mount.abs, y_1 + x_mount.abs
 
elsif x_mount < 0 && y_mount < 0
  x_3, y_3 = x_2 + y_mount.abs, y_2 - x_mount.abs
  x_4, y_4 = x_1 + y_mount.abs, y_1 - x_mount.abs
 
elsif x_mount < 0 && y_mount > 0
  x_3, y_3 = x_2 - y_mount.abs, y_2 - x_mount.abs
  x_4, y_4 = x_1 - y_mount.abs, y_1 - x_mount.abs
 
elsif  x_mount > 0 && y_mount < 0
  x_3, y_3 = x_2 + y_mount.abs, y_2 + x_mount.abs
  x_4, y_4 = x_1 + y_mount.abs, y_1 + x_mount.abs
 
elsif y_mount == 0 && x_1 < x_2
  x_3, y_3 = x_2, y_2 + x_mount.abs
  x_4, y_4 = x_1, y_1 + x_mount.abs

elsif y_mount == 0 && x_1 > x_2
  x_3, y_3 = x_2, y_2 - x_mount.abs
  x_4, y_4 = x_1, y_1 - x_mount.abs

elsif x_mount == 0 && y_1 < y_2
  x_3, y_3 = x_2 + y_mount.abs, y_2
  x_4, y_4 = x_1 + y_mount.abs, y_1

elsif x_mount == 0 && y_1 > y_2
  x_3, y_3 = x_2 - y_mount.abs, y_2
  x_4, y_4 = x_1 - y_mount.abs, y_1
end
 
puts "#{x_3} #{y_3} #{x_4} #{y_4}"
//  [rust]
use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let x1: i64 = read();
    let y1: i64 = read();
    let x2: i64 = read();
    let y2: i64 = read();

    let xd = x2 - x1;
    let yd = y2 - y1;

    let x3 = x2 - yd;
    let y3 = y2 + xd;

    let x4 = x3 - xd;
    let y4 = y1 + xd;

    println!("{} {} {} {}", x3, y3, x4, y4);
}
//  [rust]
// input! macro is published in the following URLs.
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
// https://github.com/tanakh/competitive-rs.git
#[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)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $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, [ $t:tt ]) => {
        {
            let len = read_value!($next, usize);
            (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        }
    };

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

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

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

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

fn main() {
    input! {
        x1: i64,
        y1: i64,
        x2: i64,
        y2: i64,
    }
    let vx12 = x2 - x1;
    let vy12 = y2 - y1;
    let vx23 = -vy12;
    let vy23 = vx12;
    let vx34 = -vy23;
    let vy34 = vx23;
    let x3 = x2 + vx23;
    let y3 = y2 + vy23;
    let x4 = x3 + vx34;
    let y4 = y3 + vy34;
    println!("{} {} {} {}", x3, y3, x4, y4);
}
//  [rust]
x1, y1, x2, y2 = map(int, input().split())

if x1 >= x2 and y1 >= y2:
    x3 = x2 - (y1 - y2)
    y3 = y2 + (x1 - x2)
    x4 = x3 - (x1 - x2)
    y4 = y3 - (y1 - y2)
elif x1 >= x2 and y1 < y2:
    x3 = x2 - (y2 - y1)
    y3 = y2 - (x1 - x2)
    x4 = x3 + (x1 - x2)
    y4 = y3 - (y2 - y1)
elif x1 < x2 and y1 >= y2:
    x3 = x2 + (y1 - y2)
    y3 = y2 + (x2 - x1)
    x4 = x3 - (x2 - x1)
    y4 = y3 + (y1 - y2)
else:
    x3 = x2 - (y2 - y1)
    y3 = y2 + (x2 - x1)
    x4 = x3 - (x2 - x1)
    y4 = y3 - (y2 - y1)

print("{} {} {} {}".format(x3, y3, x4, y4))
//  [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! {
        x1: i64,
        y1: i64,
        x2: i64,
        y2: i64,
    }
    let dx = x1 - x2;
    let dy = y1 - y2;
    let (x3, y3) = (x2 - dy, y2 - dx);
    let (x4, y4) = (x3 - dx, y3 - dy);
    println!("{} {} {} {}", x3, y3, x4, y4);
}
//  [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 abc(x_1:i32, y_1:i32, x_2:i32, y_2:i32) {
    let diff_x = x_2 - x_1;
    let diff_y = y_2 - y_1;

    let x_3 = x_2 - diff_y;
    let y_3 = x_2 + diff_x;
    let x_4 = x_1 - diff_y;
    let y_4 = x_1 + diff_x;

    println!("{} {} {} {}", x_3, y_3, x_4, y_4)
}

fn main() {

    input!{
        x_1: i32,
        y_1: i32,
        x_2: i32,
        y_2: i32,
    }
    abc(x_1, y_1, x_2, y_2)
}