jiahuimbzuai/CoQuIR huggingface dataset:
//  [cpp]
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
//#include<bits/stdc++.h>
#include<cstdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int cm = 1 << 17;
char cn[cm], * ci = cn + cm, ct;
inline char getcha() {
	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline int getint() {
	int A = 0;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';
	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';
	return A;
}

void pakuri_sort(int N, int A[]) {
	const int b = 8;
	int tmp[200001];
	rep(k, 4) {
		int kazu[1 << b] = {}, kazu2[1 << b] = {};
		rep(i, N) kazu[A[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu[i + 1] += kazu[i];
		for (int i = N - 1; i >= 0; i--) tmp[--kazu[A[i] >> k * b & ((1 << b) - 1)]] = A[i];
		k++;
		rep(i, N) kazu2[tmp[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu2[i + 1] += kazu2[i];
		for (int i = N - 1; i >= 0; i--) A[--kazu2[tmp[i] >> k * b & ((1 << b) - 1)]] = tmp[i];
	}
}

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	int N = getint();
	int A[200001];
	rep(i, N) A[i] = getint();
	pakuri_sort(N, A);

	bool OK = 1;
	rep(i, N - 1) OK &= (A[i] != A[i + 1]);

	printf(OK ? "YES" : "NO");

	Would you please return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define fr(i,n) for(int i=0;i<(n);++i)
#define Fr(i,n) for(int i=1;i<=(n);++i)
#define ifr(i,n) for(int i=(n)-1;i>=0;--i)
#define iFr(i,n) for(int i=(n);i>0;--i)

int HM[358623],*END=HM+358621;

bool insert(int a){
    int *p=HM+a%358621;
    while(*p){
        if(*p==a) return true;
        if(++p==END) p=HM;
    }
    *p=a;
    return false;
}

int main(){
    int n{},a,c;
    while((c=getchar_unlocked()-'0')>=0) n*=10,n+=c;
    fr(i,n){
        a=0;
        while((c=getchar_unlocked()-'0')>=0) a*=10,a+=c;
        if(insert(a)){
            putchar_unlocked('N');
            putchar_unlocked('O');
            putchar_unlocked('\n');
            return 0;
        }
    }
    putchar_unlocked('Y');
    putchar_unlocked('E');
    putchar_unlocked('S');
    putchar_unlocked('\n');
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
const int maxn = 1e9 + 5;
#define INF 1000000000
const int MOD = 1e9+7;
const double PI = 3.14159265358979323846264338;



int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	fastio
    int n;
    cin >> n;
    int a[n];
    set<int> s;
    for(int i=0; i<n; i++){
    	cin >> a[i];
    	s.insert(a[i]);
    }
    if(s.size() == n){
    	cout << "Yes\n";
    }else{
    	cout << "No\n";
    }
    return 0;
}
//  [cpp]
#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>
#include<map>
using namespace std;
/*
time:
wa:
反省:
考察:
*/
int main() {
    int n;
    cin >> n;
    int a[200001];
    for(int i = 0; i < n; i++) cin >> a[i];

    for(int i = 0; i < n; i++){
        for(int j = i+1; j < n; j++){
            if(a[i] == a[j]) {
                cout << "NO" << endl;
                return 0;
            }
        }
    }
    cout << "YES" << endl;
    return 0;
}
//  [cpp]
#include <iostream>
#include <algorithm>
#include<string.h>
using namespace std;
int a[200005];
int main()
{
    int n;
    cin>>n;
    int book[n+5];
    memset(a,0,sizeof(a));
    memset(book,0,sizeof(book));
    for(int i=0; i<n; i++)
    {
        cin>>a[i];
        book[a[i]]++;
    }
    int flag=1;
    for(int i=0; i<n; i++)
    {
       /// cout<<a[i]<<" *"<<endl;
       /// cout <<book[a[i]]<<endl;
        if(book[a[i]]>1)
        {
            flag=0;
            break;
        }
    }
    if(flag)
        cout <<"YES"<< endl;
    else
        cout<<"NO"<<endl;

    return 0;
}
//  [c]
// ABC 154-C
// 2020.2.9 bal4u

#include <stdio.h>

#define gc() getchar_unlocked()

int in() {   // 非負整数の入力
	int n = 0; int c;
	c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

// 数値のハッシュ関数
#define HASHSIZ 2000081
int hash[HASHSIZ+5], *hashend = hash + HASHSIZ;

int insert(int n) {
	int *p = hash + n % HASHSIZ;
	while (*p) {
		if (*p == n) return 1;
		if (++p == hashend) p = hash;
	}
	*p = n;
	return 0;
}

int main()
{
	int N;
	
	N = in();
	while (N--) {
		if (insert(in())) {
			puts("NO");
			return 0;
		}
	}
	puts("YES");
	return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>

void q_sort(long numbers[], int left, int right);

int main(void){
  int j,N,K,i,min;
  long A[200000]={};
  long ans;
  if(scanf("%d",&N)>1){
    exit(0);
  }
  for(i=0;i<N;i++){
   if(scanf("%ld",&A[i])>1){
    exit(0);
   }
  }
  q_sort(A,0,N-1);
  for(i=0;i<N;i++){
      if(A[i]==A[i+1]){
	printf("NO");
	goto out;
      }
      if(i==N-1){
      printf("YES");
    }
  }
 out:
  return 0;
}

void q_sort(long numbers[], int left, int right)
{
    int l_hold, r_hold;
    long pivot,pa;

    l_hold = left;
    r_hold = right;
    pivot = numbers[left];
    while (left < right)
    {
        while ((numbers[right] >= pivot) && (left < right))
            right--;
        if (left != right)
        {
            numbers[left] = numbers[right];
            left++;
        }
        while ((numbers[left] <= pivot) && (left < right))
            left++;
        if (left != right)
        {
            numbers[right] = numbers[left];
            right--;
        }
   }
    numbers[left] = pivot;
    pivot = left;
    left = l_hold;
    right = r_hold;
    if (left < pivot)
      q_sort(numbers, left, pivot-1);
    if (right > pivot)
      q_sort(numbers, pivot+1, right);
}
//  [c]
#include<stdio.h>
#include<string.h>
void swap (int *x, int *y) {
  int temp;    // 値を一時保存する変数

  temp = *x;
  *x = *y;
  *y = temp;
}

/***
* pivotを決め、
* 全データをpivotを境目に振り分け、
* pivotの添え字を返す
***/
int partition (long array[], int left, int right) {
  int i, j, pivot;
  i = left;
  j = right + 1;
  pivot = left;   // 先頭要素をpivotとする

  do {
    do { i++; } while (array[i] < array[pivot]);
    do { j--; } while (array[pivot] < array[j]);
    // pivotより小さいものを左へ、大きいものを右へ
    if (i < j) { swap(&array[i], &array[j]); }
  } while (i < j);

  swap(&array[pivot], &array[j]);   //pivotを更新

  return j;
}

/* クイックソート */
void quick_sort (long array[], int left, int right) {
  int pivot;

  if (left < right) {
    pivot = partition(array, left, right);
    quick_sort(array, left, pivot-1);   // pivotを境に再帰的にクイックソート
    quick_sort(array, pivot+1, right);
  }
}

int main(void){
   int N,flag=0;
   long A[200001];
   scanf("%d",&N);
   for(int i=0;i<N;i++){
      scanf("%ld",&A[i]);
   }
   quick_sort(A,0,N-1);
   for(int i=0;i<N;i++){
      if(A[i]==A[i+1]){
         flag=1;
         break;
      }
   }
   if(flag==1){
      printf("NO");
   }else{
      printf("YES");
   }
   return 0;
}
//  [c]
#include<stdio.h>
#include<algorithm>
using namespace std;
int a[200000];
int main()
{
	int i,n,flag=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	  scanf("%d",&a[i]);
	}
	sort(a,a+n);
	for(i=0;i<n-1;i++)
	{
	   if(a[i]==a[i+1])
	   {
	      flag=1;
	      break;
	   }
	}
	if(flag==1)
	{
		printf("NO\n");
	}
	else
	{
		printf("YES\n");
	}
	return 0;	
 }
//  [c]
#include<stdio.h>
#include<stdlib.h>

//int cmp( const void *p, const void *q ) {
//    return *(int*)p - *(int*)q;
//}
 
int main(){

  int n,temp,i,j;
  
  (void) scanf("%d",&n);
  
  int a[n];
  
  for(i=0;i<n;i++)
  {
    scanf("%d",&a[i]);    
  }
  
  //qsort(a, n, sizeof(int), cmp);
  
  for (i=0;i<n;i++)  
  {
  	for (j=i+1;j<n;j++)
    {
    	if (a[i]>a[j])
        {
        	temp=a[i];
          	a[i]=a[j];
          	a[j]=temp;
        }
    }
  }
  
  
  
  
  
  
	for (i=0;i<n;i++)
    {
    	//printf("%d ",a[i]);	
      if (a[i]==a[i+1])
        {
         printf("NO");
          return 0;
        }
    }
  
  
  
  
  /*for (i=0;i<n;i++)  
  {
    for (j=i+1;j<n;j++)
    {
       printf("a[%d]=%d a[%d]=%d\n",i,a[i],j,a[j]);
      if (a[i]==a[j])
      {
        printf("NO");
        return 0;
      }
    }
        
  }*/
        
 printf("YES");      
 return 0; 
}
//  [c]
#include<stdio.h>
#include<stdlib.h>

int cmp( const void *p, const void *q ) {
    return *(int*)p - *(int*)q;
}
 
int main(){

  int n,temp,i,j;
  
  (void) scanf("%d",&n);
  
  int a[n];
  
  for(i=0;i<n;i++)
  {
    scanf("%d",&a[i]);    
  }
  
  qsort(a, n, sizeof(int), cmp);
  
  for (i=0;i<n;i++)  
  {
  	for (j=i+1;j<n;j++)
    {
    	if (a[i]>a[j])
        {
        	temp=a[i];
          	a[i]=a[j];
          	a[j]=temp;
        }
    }
  }
  
  
  
  
  
  
	for (i=0;i<n;i++)
    {
    	//printf("%d ",a[i]);	
      if (a[i]==a[i+1])
        {
         printf("NO");
          return 0;
        }
    }
  
  
  
  
  /*for (i=0;i<n;i++)  
  {
    for (j=i+1;j<n;j++)
    {
       printf("a[%d]=%d a[%d]=%d\n",i,a[i],j,a[j]);
      if (a[i]==a[j])
      {
        printf("NO");
        return 0;
      }
    }
        
  }*/
        
 printf("YES");      
 return 0; 
}
//  [javascript]
function main(input) {
  const inputs =input.split('\n')
  const [N] = inputs[0].split(' ').map(Number)
  const A = inputs[1].split(' ').map(Number)
  const len = A.length
  const slen = (new Set(A)).size
  console.log(len === slen ? 'YES' : 'NO')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim())
//  [javascript]
"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function() {return this.index < this.max},
        "next": function() { if (!this.hasNext()) {throw "ArrayIndexOutOfBoundsException";}else{return this.list[this.index++];}}
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    const N = nextInt()
    const x = nextIntArray()
    let a = x.length
    let s = new Set(x)
    let b = s.size
    if(a === b) console.log("YES")
    else console.log("NO")

}
Main()
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
  // inputを行ごとに分割しarrayに入れる	
  input = input.split("\n");
  // input2行目の数字を個別に分けてarrayに入れる
  var num = input[1].split(" ");
  // setオブジェクトを作成
  var set = new Set(num);
  if (num.length == set.size) {
    console.log("YES");
  } else {
    console.log("NO");
  };
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	input = input.split("\n");
  	tmp = input[1].split(" ");
 	tmp.sort(function(a,b){
        if( a < b ) return -1;
        if( a > b ) return 1;
        return 0;
	});
    for(let i =1 ; i<tmp.length;i++){
      if(tmp[i]===tmp[i-1]){
        console.log("No");
        return;
      }
      console.log("Yes");
      return;
    }

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	input = input.split("\n");
  	tmp = input[1].split(" ");
 	let kensa;
  	for(let i = 0; i < tmp.length; i++){
      kensa = tmp[0];
      tmp.shift();
      console.log(tmp);
      if(tmp.indexOf(kensa) !== -1){
        console.log("No");
        return;
      }
    }
     
  
	console.log("Yes");
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  input=input.split("\n");
  if(input[input.length-1]===''){
    input.pop();
  }
  const N=input[0];
  const array=input[1].split(' ').map(e=>{
    return e-0;
  });
  var memo=[];
  var message='YES';
  array.forEach(e=>{
    for(var i=0;i<memo.length;i++){
      if(memo[i]===e){
        message='NO';
        break;
      }else if(memo[i]>e){
        memo.splice(i,0,e);
        break;
      }
      if(i===memo.length-1){
        memo.push(e);
        break;
      }
    }
    if(memo.length===0){
      memo=[e];
    }
  });
  console.log(message);
        

}


//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

func Scan() string {
	sc.Scan()
	return sc.Text()
}
func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}
func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	n := iScan()
	a := iSScan(n)
	d := make(map[int]struct{})
	for _, v := range a {
		d[v] = struct{}{}
	}
	if len(d) == len(a) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
//  [go]
package main

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

func main() {
	n := readI()
	a := make(map[int]bool)
	for i := 0; i < n; i++ {
		tmp := readI()
		if _, ok := a[tmp]; ok {
			fmt.Println("NO")
			return
		}
		a[tmp] = true
	}
	fmt.Println("YES")
}

/*-----------Input utils-----------*/

var sc = bufio.NewScanner(os.Stdin)

func init() {
	if len(os.Args) >= 2 {
		if os.Args[1] == "debug" {
			debug()
		}
	}
	const buf = 200100
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, buf), buf)
}

func debug() {
	testFile, err := os.Open("./test/sample-1.in")
	if err != nil {
		fmt.Fprintln(os.Stderr, "There is no testfile.")
		os.Exit(1)
	}
	sc = bufio.NewScanner(testFile)
}

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

func readR() []rune {
	return []rune(readS())
}

func readI() int {
	i, _ := strconv.Atoi(readS())
	return i
}

func readF() float64 {
	f, _ := strconv.ParseFloat(readS(), 64)
	return f
}
//  [go]
package main
 
import (
	"bufio"
	"os"
	//"sort"
	"strconv"
)
 
var sc = bufio.NewScanner(os.Stdin)
 
func scanInt() int {
	iv, _ := strconv.Atoi(scanString())
	return iv
}
 
func scanString() string {
	sc.Scan()
	return sc.Text()
}
 
func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 100001), 100001*100)
}

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

func main() {
	var N, A int
	N = scanInt()
	m := map[int]int {}
    var wr = bufio.NewWriter(os.Stdout)
	for i := 0; i < N; i++ {
		A = scanInt()
		if m[A] == 0 {
			m[A]++
		} else {
			wr.WriteString("NO\n")
	        wr.Flush()
			return
		}
	}
	wr.WriteString("YES\n")
	wr.Flush()
}
//  [go]
package main

import (
	"fmt"
	"sort"
)

func main() {
	var N int
	fmt.Scan(&N)
	A := make([]int, N)
	for i := range A {
		fmt.Scan(&A[i])
	}
	sort.Slice(A, func(i, j int) bool { return A[i] < A[j] })
	for i := 1; i < N; i++ {
		if A[i] == A[i-1] {
			fmt.Println("No")
			return
		}
	}
	fmt.Println("Yes")
}
//  [go]
package main

import (
	"fmt"
	"sort"
)

func main() {

	var N int
	fmt.Scanf("%d", &N)

	A := make([]int, N)
	for i := 0; i < N; i++ {
		fmt.Scanf("%d", &A[i])
	}

	sort.Ints(A)
	var flag int = 0
	for i := 0; i < N-1; i++ {
		if A[i] == A[i+1] {
			flag = 1
		}
	}

	if flag == 1 {
		fmt.Println("No")
	} else {
		fmt.Println("Yes")
	}
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var N int
	m := make(map[int]int)
	fmt.Scan(&N)

	yesOrNo := true
	for i := 0; i < N; i++ {
		var val int
		fmt.Scan("%d", &val)
		m[val] = m[val] + 1
		if m[val] > 1 {
			yesOrNo = false
		}
	}

	if yesOrNo {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
//  [ruby]
puts gets.to_i==gets.chomp.split.uniq.size ? 'YES' : 'NO'
//  [ruby]
n = gets.to_i
arr = gets.chomp.split(' ')
if arr.size == arr.uniq.size
  puts "YES"
else
  puts "NO"
end
//  [ruby]
gets.to_i
ary=gets.split.map(&:to_i)
puts ary.size==ary.uniq.size ? 'YES' : 'NO'
//  [ruby]
puts gets.to_i==gets.chomp.split.uniq.size ? 'Yes' : 'No'
//  [ruby]
puts gets.to_i==gets.chomp.split.uniq.size ?'Yes':'No'
//  [ruby]
gets
a = gets.split.map(&:to_i)

if a.size == a.uniq.size
    puts 'Yes'
else
    puts 'No'
end
//  [rust]
//  ____            _                  _                       _       _
// |  _ \ _   _ ___| |_    ___ _ __   | |_ ___ _ __ ___  _ __ | | __ _| |_ ___
// | |_) | | | / __| __|  / __| '_ \  | __/ _ \ '_ ` _ \| '_ \| |/ _` | __/ _ \
// |  _ <| |_| \__ \ |_  | (__| |_) | | ||  __/ | | | | | |_) | | (_| | ||  __/
// |_| \_\\__,_|___/\__|  \___| .__/___\__\___|_| |_| |_| .__/|_|\__,_|\__\___|
//                            |_| |_____|               |_|

//https://github.com/manta1130/Competitive_Programming_Template_Rust

#[macro_use]
mod input {

    use std;
    use std::io;

    const SPLIT_DELIMITER: char = ' ';

    #[macro_export]
    #[allow(unused_macros)]
    macro_rules! input {
    ( $($x:expr ),*) => {
        {
            let temp_str = input_line_str();
            let mut split_result_iter = temp_str.split_whitespace();
                $(
                let buf_split_result = split_result_iter.next();
                let buf_split_result = buf_split_result.unwrap();
                    ($x) = buf_split_result.parse().unwrap();
                )*
        }
    };
}

    #[allow(dead_code)]
    pub fn input_line_str() -> String {
        let mut s = String::new();
        io::stdin().read_line(&mut s).unwrap();
        s.trim().to_string()
    }

    #[allow(dead_code)]
    pub fn p<T>(t: T)
    where
        T: std::fmt::Display,
    {
        println!("{}", t);
    }

    #[allow(dead_code)]
    pub fn input_vector2d<T>(line: usize) -> Vec<Vec<T>>
    where
        T: std::str::FromStr,
    {
        let mut v: Vec<Vec<T>> = Vec::new();

        for _ in 0..line {
            let vec_line = input_vector();
            v.push(vec_line);
        }
        v
    }

    #[allow(dead_code)]
    pub fn input_vector<T>() -> Vec<T>
    where
        T: std::str::FromStr,
    {
        let mut v: Vec<T> = Vec::new();

        let s = input_line_str();
        let split_result = s.split(SPLIT_DELIMITER);
        for z in split_result {
            let buf = match z.parse() {
                Ok(r) => r,
                Err(_) => panic!("Parse Error"),
            };
            v.push(buf);
        }
        v
    }

    #[allow(dead_code)]
    pub fn input_vector_row<T>(n: usize) -> Vec<T>
    where
        T: std::str::FromStr,
    {
        let mut v = Vec::with_capacity(n);
        for _ in 0..n {
            let buf = match input_line_str().parse() {
                Ok(r) => r,
                Err(_) => panic!("Parse Error"),
            };
            v.push(buf);
        }
        v
    }

    pub trait ToCharVec {
        fn to_charvec(&self) -> Vec<char>;
    }

    impl ToCharVec for String {
        fn to_charvec(&self) -> Vec<char> {
            self.to_string().chars().collect::<Vec<_>>()
        }
    }
}

use input::*;
use std::collections::HashSet;

fn main() {
    let n: usize;
    input!(n);
    let a = input_vector::<usize>();
    let a = a.iter().collect::<HashSet<_>>();
    if a.len() == n {
        println!("YES");
    } else {
        println!("NO");
    }
}
//  [rust]
#![allow(unused_imports)]
#![allow(dead_code)]
use datastructure::*;
use input_scanner::*;

use std::cmp;
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList, VecDeque};

fn main() {
    let mut scan = Scanner::new();
    let n: usize = scan.next();
    let mut bset: BTreeSet<i32> = BTreeSet::new();
   
    for _ in 0..n {
        let a: i32 = scan.next();
        bset.insert(a);
    }
    println!("{}", if bset.len() == n {"YES"} else {"NO"});
}

mod datastructure {}
mod input_scanner {
    pub struct Scanner {
        bytes: Vec<u8>,
        begin: usize,
        end: usize,
    }
    
    impl Scanner {
        pub fn new() -> Self {
            use std::io::Read;
            let mut buffer: Vec<u8> = Vec::new();
            std::io::stdin().read_to_end(&mut buffer).unwrap();
            let end = (0..buffer.len())
                .find(|i| buffer[*i].is_ascii_whitespace())
                .unwrap_or(buffer.len());
            Scanner {
                bytes: buffer,
                begin: 0,
                end: end,
            }
        }
        pub fn next<T: std::str::FromStr>(&mut self) -> T {
            let s: &str = unsafe { std::str::from_utf8_unchecked(&self.bytes[self.begin..self.end]) };
            let ret: T = s.parse::<T>().ok().expect("Parse error.");
            self.skip();
            ret
        }
        pub fn next_vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
            (0..n).map(|_| self.next()).collect()
        }
        pub fn next_word(&mut self) -> Vec<u8> {
            let r = Vec::from(&self.bytes[self.begin..self.end]);
            self.skip();
            r
        }
        fn skip(&mut self) {
            self.begin = (self.end..self.bytes.len())
                .find(|i| !self.bytes[*i].is_ascii_whitespace())
                .unwrap_or(self.bytes.len());
            self.end = (self.begin..self.bytes.len())
                .find(|i| self.bytes[*i].is_ascii_whitespace())
                .unwrap_or(self.bytes.len());
        }
    }  
}
//  [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")
}

pub fn read_n<T: FromStr>(n: usize) -> Vec<T> {
    read_n_logic::<T>(n, vec![])
}

pub fn read_n_logic<T: FromStr>(n: usize, mut a: Vec<T>) -> Vec<T> {
    match n {
        0 => a,
        _ => {
            a.push(read::<T>());
            read_n_logic(n - 1, a)
        }
    }
}
use std::cmp::{max, min};

fn main() {
    let n: usize = read();
    let a: Vec<i64> = read_n(n);
    let mut b: Vec<bool> = vec![false; 1_000_000_000];
    let mut ans: String = "YES".to_string();

    for i in 0..a.len() {
        let ai = a[i];
        if b[ai] == false {
            b[ai] = true;
        } else {
            ans = "NO";
            break;
        }
    }

    println!("{}", ans);
}
//  [swift]
// 🐋💭
import Foundation

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



func main() {
    let n = Int(readLine()!)!
    var aryA = readInts()
    //_________________________ここまで入力
    aryA.sort()
    for i in 0..<n-1 {
        if aryA[i] == aryA[i+1] {
            print("NO")
            return
        }
    }
    print("YES")
}

main()
//  [swift]
import Foundation
 
let N = Int(readLine()!)!
var array =  readLine()!.componentsSeparatedByString(" ").map { Int($0)! }
var answer = "YES"
array = array.sort()
for i in 0 ..< N - 1 {
  	let diff = array[i] - array[i + 1]
    if  diff == 0 {
        answer = "NO"
    }
}
print(answer)
//  [swift]
// 🐋💭
import Foundation

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



func main() {
    let n = Int(readLine()!)!
    var aryA = readInts()
    //_________________________ここまで入力
    aryA.sort()
    for i in 0..<n-1 {
        if aryA[i] == aryA[i+1] {
            print("No")
            return
        }
    }
    print("Yes")
}

main()
//  [swift]
import Foundation

extension Array where Element: Equatable {
    mutating func remove(value: Element) {
        if let i = self.indexOf(value) {
//        if let i = self.firstIndex(of: value) {
            self.removeAtIndex(i)
        }
    }
}

let N = Int(readLine()!)!
//var array =  [1,1,1]
var array =  readLine()!.componentsSeparatedByString(" ").map { Int($0)! }
var answer = "YES"
_ = array.map {
    //array.remove(value: $0)
	if let i = array.indexOf($0) {
        array.removeAtIndex(i)
    }
    if array.contains($0) {
        answer = "NO"
    }
}
print(answer)
//  [typescript]
import * as fs from "fs";

const lines = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n")

const arr = lines[1].split(' ').map(Number)

const set = new Set(arr)

console.log(arr.length === set.size ? 'YES' : 'NO')
//  [typescript]
class AtCoder {
  // 入力系
  input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);
  input_i=-1;
  n(){
    this.input_i++;
    return Number(this.input[this.input_i]);
  }
  nn(n):number[]{
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.n());
    }
    return a;
  }
  s(){
    this.input_i++;
    return String(this.input[this.input_i]);
  }
  ss(n):string[]{
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.s());
    }
    return a;
  }

  // コンソール
  o(...a:any){
    console.log(...a);
  }

  // Math
  abs(a:number){
    return Math.abs(a);
  }
  min(...a:number[]){
    return Math.min(...a);
  }
  max(...a:number[]){
    return Math.max(...a);
  }
  floor(a:number){
    return Math.floor(a);
  }
  ceil(a:number){
    return Math.ceil(a);
  }
  round(a:number){
    return Math.round(a);
  }

  // ソート
  asc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return a-b});
  }
  desc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return b-a});
  }

  // 自作
  gcd(...arr):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=x;
    }
    return arr[arr.length-1];
  };
  lcm(...arr):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=arr[i]*arr[i+1]/x;
    }
    return arr[arr.length-1];
  };
  isPrime(n:number):boolean{
    if(n < 2) return false;
    const suq=Math.sqrt(n);
    for(let i=2;i<=suq;i++){
      if(n%i==0){
        return false;
      }
    }return true;
  };
  deduplicate(a:any[]):any[]{
    return Array.from(new Set(a));
  };
}
const main = () => {
  const o = new AtCoder()
  let obj ={}
  let n=o.n()
  for(let i=0;i<n;i++){
    let s=o.s()
    if(obj[s]){
      o.o('NO')
      return
    }
    obj[s]=1;
  }
  o.o('YES')
}
main();
//  [typescript]
import * as fs from "fs";

const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
//const n = +input[0];
//const a = [];
//for(let i=0;i<n;i++){
//	a.push(input[i+1].split(" ").map((x:string):number=>+x));
//}

//const [n, m] = input[0].split(" ").map((x: string): number => +x);
//const a = input[1].split(" ").map((x: string): number => +x);

function compareFunc(a, b){
    return a-b;
}

const n : number = +input[0];
const a : number[] = input[1].split(' ').map((x: string): number => +x);

a.sort(compareFunc);
let ans: string = 'YES';
for (let i = 0; i < n-1; i++){
    if (a[i] === a[i+1]){
        ans = 'NO';
    }
}

console.log(ans);
//  [typescript]
const main = (input: string) => {
  const lines = input.trim().split("\n")
  const N = parseInt(lines[0])
  const A = lines[1].split(" ").map(str => parseInt(str))
  
  const removeDuplicates = A.filter((x, i, self) => {
    return self.indexOf(x) === i
  })

  let answer = "NO"
  if(removeDuplicates.length === A.length) {
    answer = "YES"
  }

  console.log(answer)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
import * as fs from 'fs';

const [n, as] = fs.readFileSync("/dev/stdin", "utf8").split("\n")
const uniq = [...new Set(as.split(" "))]
console.log(uniq.length === +n ? "YES" : "NO")
//  [typescript]
import * as fs from 'fs';

const input = fs.readFileSync("/dev/stdin", "utf8")
const nums = input.split("\n")[1].split(" ")
const unique = nums.filter((v, i, self) => self.indexOf(v) === i)
console.log(unique.length === nums.length ? "YES" : "NO")
//  [python]
s=input()
ans=1000
for i in range(len(s)-2):
    ans=min(ans,abs(753-int(s[i:i+3])))
    
print(ans)
//  [python]
s=input()
l=len(s)
min=1000
for i in range(l-2):
    num=s[i]+s[i+1]+s[i+2]
    num2=abs(753-eval(num))
    if num2<min:
        min=num2
print(min)
//  [python]
S = input()
ans = 99999
for i in range(len(S) - 2):
    a = int(S[i:i+3])
    ans = min(ans, abs(a-753))
print(ans)
//  [python]
S = input()
min = 1000
for i in range(len(S) - 2):
	x = int(S[i:i+3])
	print(x)
	x = abs(753 - x)
	if min > x:
		min = x
print(min)
//  [python]
s = input()

arr = []

for i in range(0, len(s) - 2):
    arr.append(753 - int(str(s[i]) + str(s[i + 1]) + str(s[i + 2])))

print(min(arr))
//  [python]
table = list(map(int, input()))
diff_nagomi = 1000
for i in range(len(table)-2):
    diff = abs(table[i] * 100 + table[i + 1] * 10 + table[i + 2] - 753)
    if diff_nagomi > diff:
        ans = diff
print(ans)
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	br.close();
	int rgd = 999;
	int sft = 753;
    	for (int i=0;i<s.length()-2;i++) {
	    int sub = Integer.parseInt(s.substring(i,i+3));
	    if (Math.abs(sft-sub) < rgd) {
		rgd = (int)Math.abs(sft-sub);
	    }
	}
	System.out.println(rgd);
    }	
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	//数値の入力
		String str = sc.next();
      	int min = 999;
      	for(int i = 1; i+2 < str.length(); i++){
      	int ans = Math.abs(Character.getNumericValue(str.charAt(i))*100 
          + Character.getNumericValue(str.charAt(i+1))*10 
          +Character.getNumericValue(str.charAt(i+2))
          - 753);
          if(min>=ans){
            min = ans;
          }
        }
      	System.out.println(min);
    }
}
//  [java]
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      int len = s.length(); 
      int ans = 753;
      int x = 0;
      int xx = 753;
      String list[] = s.split("");    
		int[] a = new int[len];
		for(int i=0; i<len; ++i){
			a[i] = Integer.parseInt(list[i]);
		}
      for(int i=0; i<len-2; ++i){
        int x = a[i]*100 + a[i+1]*10 + a[i+2];
        xx = Math.abs(753-x);
        if(ans>xx){
          ans = xx;
        }
      }
      System.out.println(ans);
	}
}
//  [cpp]
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
#include<functional>
#include <random>

using namespace std;

int main(void) {
	char S[11];
	int ans, len, t;
	scanf("%s", S);
	len = strlen(S);

	ans = 1000;
  for(int i=0; i<len-2; i++){
			t = (S[i] - '0')*100 + (S[i+1] - '0')*10 + (S[i+2] - '0');
			if(t > 753){
				ans = min(ans, t-753);
			}else{
				ans = min(ans, 753-t);
			}
	}
	printf("%d", ans);
}
//  [cpp]
#include<stdio.h>
#include<string.h>
#include<cmath>
#include<algorithm>
using namespace std;

int main()
{
    char s[15];
    scanf("%s",s);
    int len = strlen(s);
    int ans = 100000000;
    for(int i = 0; i <= len - 3; i++)
    {
        int tp = (s[i]-'0')*100 + (s[i+1]-'0')*10 + s[i+2]-'0';
        ans = min(ans,abs(tp-753));
    }
    printf("%d\n",ans);
    return 0;
}
//  [cpp]
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
int main(){
    char s[20];
    int sum=0,clo=10000000,m=100,i;
    scanf("%s",s);
    for(i=0;i<strlen(s)-2;i++){
        for(int j=i;j<=i+2;j++){
            sum=sum+(s[j]-48)*m;
            m=m/10;
        }
        if(clo>abs(sum-753)){
               clo=abs(sum-753);
            
        }
        sum=0;
        m=100;
        
    }
    if(clo==0){
        printf("0");
    }
    else{
        
        printf("%d",clo);
    }
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main()
{
   string s;
   cin>>s;
   int diff, t=753;
   for (int i = 0; i < s.size() -3 ; i++)
   {
       diff = 753 - (s[i]-'0') * 100 - (s[i+1] - '0')*10 - (s[i+2] - '0');
       t = min(t, abs(diff)); 
   }
   cout<<t;
   

   return 0;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main()
{
   string S;
   cin>>S;
   int diff=753, t=753;
   int s = stoi(S);
   int length = S.size();
   cout<<s<<endl;
   for (int i = 0; i < S.size()-3; i++)
   {
       diff = 753 - s / (int)pow(10, length-3);
       cout<<s / (int)pow(10, length-3)<<endl;
       if (abs(diff)<=t)
       {
           t = abs(diff);
       }
       s = s%(int)pow(10, length-1);
       length -= 1;
       cout<<s<<" "<<length<<endl;      
   }
   cout<<t;
   
   return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main(){
    string s;
    cin>>s;
    int ans=1e9;
    for(int i=0;i<s.size();i++){
        for(int j=0;j<3;j++){
            if(i+j>=s.size()){
                break;
            }
            ans=min(ans,abs(753-stoi(s.substr(i,j))));
        }
    }
    cout<<ans<<endl;
    return 0;
}
//  [c]
// AtCoder150 C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <string.h>
#include <memory.h>
#include <malloc.h>
#include <stdlib.h>
#include <ctype.h>

// qsortで用いる比較用関数．*a<*bならaが先になる．
int compare(const void* a, const void* b) {
    return *(int*)a - *(int*)b;
}

int revcompare(const void* a, const void* b) {
    return *(int*)b- *(int*)a;
}

int main(void)
{
    int i,j,n;
    char s[11];

    scanf("%s", s);

    int min = 753;

    for(i = 0; i < strlen(s)-2;i++){
        int tmp = (s[i]-'0')*100 + (s[i+1]-'0')*10 + (s[i+2]-'0');
        if(min > abs(tmp-753)) min = abs(tmp-753);
    }
    printf("%d", min);
    return 0;

}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    char str[11];
    char three[3];
    int num,min=1000,sa,len,i,j=0;

    scanf("%s",str);
    len = strlen(str);
    while(j<len-2){
        strncpy(three, str+j,3);
        three[3] = '\0';
        num = atoi(three);
        sa = 753 - num;
        if(sa<0){
            sa *= -1;
        }
        if(sa < min){
            min = sa;
        }
        j++;
    }

        printf("%d",min);
    return 0;
}
//  [c]
#include <stdio.h>

int main(void)
{
 int i=0, ch,a[10] = {0};

 while((ch = getchar()) != EOF){
  a[i] = ch - '0';
  i++;
 }
 int count = i-1, min = 900;

 for(i=0; i<count-2; i++){
  int num = a[i] * 100 + a[i+1] * 10 + a[i+2];
  int a = (753 > num) ? 753-num : num-753;
  if(min > a){
   min = a;
  }
 }
 printf("%d\n", min);
 return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>

#define rep(i, n) for(int i=0; i<(n); ++i)
#define max  200001

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    int se, mmin=INT_MAX;
    char s[11], at[4];
    
    scanf("%s", s);
    
    rep(i, strlen(s)-3){
        at[0]=s[i];
        at[1]=s[i+1];
        at[2]=s[i+2];
        se=atoi(at);
        if (mmin>abs(se-753)) {
            mmin=abs(se-753);
        }
    }
    
    printf("%d\n", mmin);
    
    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>

#define rep(i, n) for(int i=0; i<(n); ++i)
#define max  200001

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    int se, mmin=INT_MAX;
    char s[11], at[3];
    
    scanf("%s", s);
    
    rep(i, strlen(s)-3){
        at[0]=s[i];
        at[1]=s[i+1];
        at[2]=s[i+2];
        se=atoi(at);
        if (mmin>abs(se-753)) {
            mmin=abs(se-753);
        }
    }
    
    printf("%d\n", mmin);
    
    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>

#define rep(i, n) for(int i=0; i<(n); ++i)
#define max  200001

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    int se, mmin=INT_MAX;
    char s[11], at[3];
    
    scanf("%s", s);
    
    rep(i, strlen(s)-2){
        at[0]=s[i];
        at[1]=s[i+1];
        at[2]=s[i+2];
        se=atoi(at);
        if (mmin>abs(se-753)) {
            mmin=abs(se-753);
        }
    }
    
    printf("%d\n", mmin);
    
    return 0;
}
//  [javascript]
function main(input) {
  var args = input.split("");
  var arr = [];
  for (var i = 0; i < args.length - 2; i++) {
    arr[i] = args[i] + args[i + 1] + args[i + 2];
  }
  for (var i = 0; i < arr.length; i++) {
    arr[i] = parseInt(arr[i], 10);
  }

  var num = arr[0];
  for (var i = 0; i < arr.length; i++) {
    var res = Math.abs(num - 753);
    var res2 = Math.abs(arr[i] - 753);
    if (res > res2) {
      num = arr[i];
    }
  }
  console.log(Math.abs(num - 753));
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input);
	//input = input.trim().split(" ");
	//input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var S = input;
  var output = 1000;
  for(var i = 0; i <= S.length - 3; i++){
    var tmp = parseInt(S.slice(i,i+3));
    output = Math.min(output,Math.abs(753 - tmp));
  }
  myout(output);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]
s = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[0]
min = 10000
for (i=0; i<s.length-2; i++) {
    a = Math.abs(753 - s.slice(i, i+3) * 1)
    if (min > a) {
        min = a
    }
}
console.log(min)
//  [javascript]
function main(input) {
  const S = input.split('');
  let min;
  
  for (let i = 0; i < S.length -2; i++) {
    a = parseInt(S[i], 10);
    b = parseInt(S[i+1], 10);
    c = parseInt(S[i+2], 10);
    num = 753 - (a * 100 + b * 10 + c);
    gap = Math.abs(num);
    if (!min || min >= gap) {
      min = gap;
    }
  }
  
  console.log(min);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  const S = input.split('');
  let min;
  
  for (let i = 0; i < S.length -2; i++) {
    a = parseInt(S[i], 10);
    b = parseInt(S[i+1], 10);
    c = parseInt(S[i+2], 10);
    num = a * 100 + b * 10 + c;
    gap = Math.abs((753 - num));
    if (!min || min >= gap) {
      min = gap;
    }
  }
  
  if (min === 0) {
    console.log('0');
  } else {
    console.log(min);
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  const S = input.split('');
  let min;
  
  for (let i = 0; i < S.length -2; i++) {
    num = S[i] + S[i+1] + S[i+2];
    num = parseInt(num, 10);
    gap = Math.abs(num - 753);
    if (!min || min >= gap) {
      min = gap;
    }
  }
  
  if (min === 0) {
    console.log('0');
  } else {
    console.log(min);
  }
}

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

import (
	"fmt"
	"strconv"
)

func main() {
	var s string
	fmt.Scanf("%s", &s)

	res := 1<<60
	for i := 0; i <= len(s)-3; i++ {
		x, _ := strconv.Atoi(s[i:i+3])
		d := 753 - x
		if d < 0 {
			d *= -1
		}
		if res > d {
			res = d
		}
	}

	fmt.Println(res)
}
//  [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 abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func main() {
	s := next()

	m := 1<<63 - 1
	for i := 0; i < len(s)-2; i++ {
		ss, _ := strconv.Atoi(s[i : i+3])
		if m > abs(ss-753) {
			m = abs(ss - 753)
		}
	}

	fmt.Println(m)
}
//  [go]
package main

import (
	"fmt"
	"math"
	"strconv"
)

func main() {
	var s string
	fmt.Scan(&s)
	if len(s) < 4 && len(s) > 10{
		return
	}
	first_num := s[0 : 3]
	min, _ := strconv.Atoi(first_num)
	fmt.Println(min)
	for i:=1; i<len(s)-2; i++{
		slice_num := s[i : i+3]
		num, _ := strconv.Atoi(slice_num)
		if math.Abs(float64(num)-753.0) < math.Abs(float64(min)-753.0){
			min = num
		}
	}
	fmt.Println(math.Abs(float64(min) - 753.0))
}
//  [go]
package main

import (
	"fmt"
	"math"
	"strconv"
)

func main() {
	var s string
	fmt.Scan(&s)
	if len(s) < 4 && len(s) > 10{
		return
	}
	first_num := s[0 : 3]
	min, _ := strconv.Atoi(first_num)
	fmt.Println(min)
	for i:=1; i<len(s)-2; i++{
		slice_num := s[i : i+3]
		num, _ := strconv.Atoi(slice_num)
		fmt.Println(num)
		if math.Abs(float64(num)-753.0) < math.Abs(float64(min)-753.0){
			min = num
		}
	}
	fmt.Println(math.Abs(float64(min) - 753.0))
}
//  [go]
package main

import (
	"fmt"
	"math"
	"strconv"
)

func main() {
	var s string
	fmt.Scan(&s)
	if len(s) < 4 && len(s) > 10{
		return
	}
	first_num := s[0 : 3]
	min, _ := strconv.Atoi(first_num)
	for i:=1; i<len(s)-2; i++{
		slice_num := s[i : i+3]
		num, _ := strconv.Atoi(slice_num)
		if math.Abs(float64(min-753)) < float64(min){
			min = num
		}
	}
	fmt.Println(math.Abs(float64(min - 753)))
}
//  [ruby]
#754
s = gets.split('').map(&:to_i)
ans = []
(s.size - 3).times do |i|
	x = 0
	vessel = []
	vessel << s[i]
	vessel << s[i + 1]
	vessel << s[i + 2]
	x = vessel.join.to_i

	ans << (753 - x).abs
end

puts ans.min
//  [ruby]
s = gets.chomp
diffs = []
(s.length - 2).times do |i|
    num = s[i].to_i * 100 + s[i+1].to_i * 10 + s[i+2].to_i
    diff = (num - 753).abs
    diffs << diff
end
puts diffs.min
//  [ruby]
s = gets.chomp
sa = 10000
for i in 0..(s.length-3) do
  hoge = (753 - s[i..(i+2)].to_i).abs
  if (sa > hoge)
    sa = hoge
  end
end
puts sa
//  [ruby]
s = gets.chomp
tmp = s.split("")
ans = []
(0..s.size-3).each do |i|
  ans << tmp[i..i+2].join.to_i
end
puts ans.min_by{|x|(x-753).abs}
//  [ruby]
s = gets.chomp
tmp = s.split("")
ans = []
(0..s.size-2).each do |i|
  ans << 753 - tmp[i..i+2].join.to_i
end
puts ans.min
//  [ruby]
B = gets.split('').map(&:to_i)

min = 1000

B.each_cons(3) do |i|
  d = (753 - i.join('').to_i).abs
  min = d if d < min
end

puts min
//  [rust]
use std::io;
use std::cmp::min;

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 mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let s = buf.trim();
	let mut mini:i32 = 700;
	for i in 0..(s.len()-2) {
		let x = &s[i..(i+3)];
		let xi:i32 = x.parse().ok().unwrap();
		mini = min(mini, (753 - xi).abs());
	}
	println!("{}", mini);
}
//  [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 s: Vec<u32> = read::<String>()
        .chars()
        .map(|x| x.to_digit(10).unwrap())
        .collect();

    let mut minv = std::u32::MAX;
    let tn = 753;

    for i in 0..s.len() - 2 {
        let a = s[i];
        let b = s[i + 1];
        let c = s[i + 2];
        let x = 100 * a + b * 10 + c;
        if x > tn {
            if minv > x - tn {
                minv = x - tn;
            }
        } else {
            if minv > tn - x {
                minv = tn - x;
            }
        }
    }
    println!("{}", minv);
}
//  [rust]
use proconio::input;

fn diff(a: &[u8]) -> i32 {
    let n: i32 = (a[0] - b'0') as i32 * 100
        + (a[1] - b'0') as i32 * 10
        + (a[2] - b'0') as i32;
    if n >= 753 {
        n - 753
    } else {
        753 - n
    }
}

fn main() {
    input!{
        s: String,
    }
    let sv = s.as_bytes().to_vec();
    let mut mind = i32::MAX;
    for i in 0..sv.len()-2 {
        let d = diff(&sv[i..i+3]);
        if mind > d {
            mind = d;
        }
    }
    println!("{}", mind);
}
//  [rust]
#![allow(
    non_snake_case,
    unused_variables,
    unused_assignments,
    unused_mut,
    unused_imports,
    dead_code
)]
//use proconio::fastout;
use proconio::input;
use proconio::marker::*;
//use std::collections::HashSet;
use std::cmp::*;
//use std::collections::VecDeque;

fn main() {
    input! {
      mut S:i32
    }
    let mut ans = 999;

    while S >= 100 {
        let a = S % 1000;
        ans = min(ans, (a - 753).abs());
        S = S / 10;
    }
    println!("{}", ans);
}
//  [rust]
use std::io::*;
use std::str::FromStr;
 
/* 
The read function reads a string according to each one. 
*/
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 abs(x:i32)-> i32{
    if x < 0{
	-1*x
    }else {
	x
    }
}

//main function
fn main() {
    let number: i32 = 753;
    let mut x: i32 = read();
    let mut min: i32 = x;
    while x > 100 {
	if min > abs(x%1000-number) {
	    min = abs(x%1000-number);
	}
	x /= 10;
    }
    println!("{}",min);
}
//  [swift]
let S = readLine()!.characters.map{Int(String($0))!}
var ans = 1000
for i in 0..<S.count-2 {
    ans = min(abs(S[i]*100+S[i+1]*10+S[i+2]-753), ans)
}
print(ans)
//  [swift]
let S = readLine()!.characters.map{String($0)}
var ans = 1000
for i in 0..<S.count-2 {
    ans = min(abs(Int(S[i]+S[i+1]+S[i+2])!-753), ans)
}
print(ans)
//  [swift]
let S: String = readLine()!
var res: Int = 1000

var idxl: String.Index = S.startIndex
var idxr: String.Index = S.index(S.startIndex, offsetBy: 2)

while idxr < S.endIndex {
    res = min(res, abs(Int(S[idxl...idxr])! - 753))
    idxl = S.index(after: idxl)
    idxr = S.index(after: idxr)
}
print(res)
//  [swift]
let S = readLine()!.characters.map{Int(String($0))!}
var ans = 0
for i in 0..<S.count-2 {
    ans = min(abs(S[i]*100+S[i+1]*10+S[i+2]-753), ans)
}
print(ans)