jiahuimbzuai/CoQuIR huggingface dataset:
//  [cpp]
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <random>
#include <unordered_map>
#include <unordered_set>
#define all(a) a.begin(),a.end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define pb push_back
#define debug(x) cerr << #x << ':' << x << '\n'
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
typedef complex<ld> com;
constexpr int inf = 1000000010;
constexpr ll INF = 1000000000000000010;
constexpr ld eps = 1e-12;
constexpr ld pi = 3.141592653589793238;
template<class T, class U> inline bool chmax(T &a, const U &b) { if (a < b) { a = b; return true; } return false; }
template<class T, class U> inline bool chmin(T &a, const U &b) { if (a > b) { a = b; return true; } return false; }


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(20);

	int l, r, d;
	cin >> l >> r >> d;
	cout << r / d - (l - 1) / d << '\n';
}
//  [cpp]
#include <bits/stdc++.h>
#define rep(i, start, end) for (long long i = start; i < end; ++i)
#define repreverse(i, start, end) for (long long i = start; i >= end; --i)
#define all(x) (x).begin(), (x).end()
#define len(x) ((long long)(x).size())
#define lcm(a, b) ((a) / __gcd((a), (b)) * (b))
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vllvll = vector<vll>;
using pll = pair<ll, ll>;
template<class T>void print1d(T x,ll n=-1){if(n==-1)n=x.size();rep(i,0,n){cout<<x[i]<<' ';}cout<<'\n';}
template<class T>void print2d(T x,ll r=-1,ll c=-1){if(r==-1)r=x.size();if(c==-1)c=x[0].size();rep(i,0,r)print1d(x[i],c);}
template<class T, class U>bool haskey(T mp, U key) { return mp.find(key) != mp.end(); }
template<class T, class U>bool isin(T el, U container) { return find(all(container), el) != container.end(); }
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
template<class T>bool even(T n) { return ! (n & 1); }
template<class T>bool odd(T n) { return n & 1; }
template<class T>ld deg2rad(T deg) { return M_PI * deg / 180.0; }
template<class T>ld rad2deg(T rad) { return 180.0 * rad / M_PI; }
ll intpow(ll a,ll n){ll p=1;while(n){if(n&1)p*=a;a*=a;n>>=1;}return p;}
const long double pi = M_PI;
const long long big = 1LL << 50;
const long long inf = 1LL << 60;
const long long mod = 1e9 + 7;



int main()
{
        ll L, R, d;
        cin >> L >> R >> d;
        cout << (R/d) - (L-1)/d << endl;
}
//  [cpp]
#include <iostream>
using namespace std;
 
int main(){
	int L, R, d, mul=0; 
	cin>>L>>R>>d;
	if(L!=d){ 
		mul= R/d - L/d;
		cout<<mul<<endl; 
	}
	else{ 
	mul = R/d;
	cout<<mul<<endl;
	}
	
}
//  [cpp]
/*==========================================================================*/
/*
    AUTHOR:    BPZ
	CREATED:   10.09.2020 18:04:20

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  const int maxn = (int)1e7 + 6;
  vector<int> ans(maxn, 0);
 	for (int i = 1; i <= 1000; i++) {
 		for (int j = 1; j <= 1000; j++) {
 			for (int k = 1; k <= 1000; k++) {
 				int pos = pow(i + j + k, 2) - i * j - i * k - j * k;
 				ans[pos]++;
 			}
 		}
 	}
 	for (int i = 1; i <= n; i++) {
 		cout << ans[i] << '\n';
 	}
  return 0;
}
//  [c]
#include <stdio.h>
int main(){
    int l, r, d, cont=0;
    scanf("%d %d %d", &l, &r, &d);
    for(int i = l; i <= r; ++i){
        if(i%d==0)
            cont++;
    }
    printf("%d\n", cont);


    return 0;
}
//  [c]
int L,R,d,cnt=0;
main()
{
  scanf("%d%d%d",&L,&R,&d);
  for(int i=L;i<=R;i++)if(i%d==0)cnt++;
  printf("%d\n",cnt);
}
//  [c]
#include<stdio.h>
int main()
{
  int i,l,r,d,count=0;
  scanf("%d %d %d",&l,&r,&d);
  for(i=l;i<=r;i++)
  {
    if(i % d == 0)
    {
      count++;
    }
  }
  printf("%d",count);
}
//  [c]
#include<stdio.h>
int sum(int a,int b,int c){
 if(a>=b&&a>=c)
   return a;
  else if(b>=a&&b>=c)
    return b;
  else
    return c; 
}

int main(){
  int a,b,c;
  scanf("%d%d%d",&a,&b,&c);
  printf("%d",sum(a,b,c));
  return 0;
}
//  [c]
#include<stdio.h>
int sum(int a,int b,int c){
 if(a>=b&&a>=c)
   return a;
  else if(b>=a&&b>=c)
    return b;
  else
    return c; 
}

int main(){
  int a,b,c;
  scanf("%d",&a,&b,&c);
  printf("%d",sum(a,b,c));
  return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
int main(void){
  int l,r,n,d;
  n=0;
  scanf("%d %d %d",&l,&r,&d);
  for(int i=0;i<r-l+1;i++){
    if((l+i)%d==0){
      n++;
    }
  }
  printf("%d",&n);
  return 0;
}
//  [javascript]
function Main(input) {
  let lines = input.split("\n");
  lines.pop();
  lines = lines[0].split(" ");
  fnum = parseInt(lines[0]);
  lnum = parseInt(lines[1]);
  multiple = parseInt(lines[2]);
  let count = 0;
  for(let i = fnum; i <= lnum; i++){
  	if(i%multiple === 0) count++;
  }
  console.log(count);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
//let input = "6 20 7";

function main(input){
  input = input.trim();
  let list = input.split(" ");
  let min = parseInt(list[0])-1;
  let max = parseInt(list[1]);
  let a = parseInt(list[2]);
  let dai = Math.floor(max/a);
  let syou = Math.floor(min/a);
  let answer = dai - syou;
  console.log(answer);
}
//main(input);
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const L = parseInt(arg[0].split(" ")[0]);
    const R = parseInt(arg[0].split(" ")[1]);
    const d = parseInt(arg[0].split(" ")[2]);
    
    let answer = 0;
    
    for(let i=L; i<=R; i++) {
        if(i % d === 0) answer++;
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
//let input = "6 20 7";

function main(input){
  input = input.trim();
  let list = input.split(" ");
  let min = parseInt(list[0]);
  let max = parseInt(list[1]);
  let a = parseInt(list[2]);
  let dai = Math.floor(max/a);
  let syou = Math.floor(min/a);
  let answer = dai - syou;
  console.log(answer);
}
//main(input);
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
//let input = "6 20 7";

function main(input){
  input = input.trim();
  let list = input.split(" ");
  let min = parseInt(list[0]);
  let max = parseInt(list[1]);
  let a = parseInt(list[2]);
  let dai = Math.floor(max/a);
  let syou = Math.floor(min/a);
  let answer = dai - syou;
  console.log(answer);
}
//main(input);
function main(input){ } main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input){
  input = input.trim();
  let list = input.split(" ");
  let min = parseInt(list[0]);
  let max = parseInt(list[1]);
  let a = parseInt(list[2]);
  let dai = Math.floor(max/a);
  let syou = Math.floor(min/a);
  let answer = dai - syou;
  console.log(answer);
}
function main(input){ } main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main
 
import "fmt"
 
func main() {
  var l,r,d int
  fmt.Scan(&l,&r,&d)
  answer := (r/d - (l-1) / d)
  if (l==r && r==d) {
      fmt.Println(1)
  } else {
    fmt.Println(answer)
  }
}
//  [go]
package main

import "fmt"

func main() {
	a, b, c := 0, 0, 0
	fmt.Scanf("%d %d %d", &a, &b, &c)
	fmt.Println(b/c-(a-1)/c)
}
//  [go]
package main
 
import "fmt"
 
func main() {
  var l,r,d int
  fmt.Scan(&l,&r,&d)
  var c int
  for {
    if l > r {
      break
    } else if (l / d) == 0 {
      c++
    }
    l++
  }
  fmt.Println(c)
}
package main
 
import "fmt"
 
func main() {
  var l,r,d int
  fmt.Scan(&l,&r,&d)
  var c int
  for {
    if l > r {
      break
    } else if (l % d) == 0 {
      c++
    }
    l++
  }
  fmt.Println(c)
}
//  [go]
package main
 
import "fmt"
 
func main() {
  var l,r,d int
  fmt.Scan(&l,&r,&d)
  var c int
  for {
    if l > r {
      break
    } else if (l / d) == 0 {
      c++
    }
    l++
  }
  fmt.Println(c)
}
//  [go]
package main
 
import "fmt"
 
func main() {
  var l,r,d int
  fmt.Scan(&l,&r,&d)
  answer := (r-l+1) / d
  if (l==r && r==d) {
      fmt.Println(1)
  } else {
    fmt.Println(answer)
  }
}
//  [ruby]
L, R, d = gets.split.map(&:to_i)
count = 0

(L..R).each do |i|
  count += 1 if i % d == 0
end

puts count
//  [ruby]
l, r, d = gets.split.map(&:to_i)

puts r / d - (l - 1) / d
//  [ruby]
L,R,d = gets.chomp.split.map(&:to_i)
cnt = 0

(L..R).each do |num|
    if num % d == 0
        cnt += 1
    end
end

puts cnt
//  [ruby]
L, R, d = gets.split.map(&:to_i)

puts d==1 ? R/d - L/d + 1 :  R/d - L/d
//  [ruby]
L,R,d = gets.chomp.split.map(&:to_i)

puts R/d-L/d
//  [ruby]
n = gets.to_i

res = []
(1..Math.sqrt(n).to_i).each do |x|
  (1..Math.sqrt(n).to_i).each do |y|
    (1..Math.sqrt(n).to_i).each do |z|
      cal = (x**x) + (y**y) + (z**z) + (x * y) + (y * z) + (z * x)
      res << cal
    end
  end
end
n_res = res.select { |r| r <= n }

(1..n).each do |i|
  puts n_res.count(i)
end
//  [rust]
use whiteread::parse_line;

fn main() {
    let (l, r, d): (u64, u64, u64) = parse_line().unwrap();
    println!("{}", (l..=r).filter(|x| x % d == 0).count());
}
//  [rust]
fn input_vec<T: std::str::FromStr>()->Vec<T>{
	let mut s = String::new();
	std::io::stdin().read_line(&mut s).ok();
	s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}
fn main() {
	let input = input_vec::<i64>();
	let l = input[0];
	let r = input[1];
	let d = input[2];
	let result = (r-r%d)/d-(l-1-(l-1)%d)/d;
	println!("{}",result);


    
}
//  [rust]
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::{Bytes, Chars};
#[allow(unused_imports)]
use std::cmp::{min, max};

fn main() {
	input! {
		l: usize,
		r: usize,
		d: usize,
	}

	let mut count = 0;
	for i in l..=r {
		if i % d == 0 {
			count += 1;
		}
	}

	println!("{}", count);
}
//  [rust]
sed_imports)]
#![allow(dead_code)]

use proconio::input;
use proconio::marker::{Bytes, Chars};
use std::collections::*;

fn main() {
    input! {l:i32,r:i32,d:i32}
    let ans = r / d - (l - 1) / d;
    println!("{}", ans);
}
//  [rust]
use std::io;

fn main() {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    let mut n = buf.split(' ');
    let mut n = || n.next().unwrap().parse().unwrap();
    let l: i32 = n();
    let r: i32 = n();
    let d: i32 = n();
    println!("{}", (l..=r).filter(|x| x % d == 0).count());
}
//  [swift]
let (l, r, d) = readInts().mapToTuple()
print((l...r).filter { $0.isMultiple(of: d) }.count)


// MARK: -----------------------------------------------------------------------


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

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

extension Collection {
    func mapToTuple() -> (Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!)
    }
    func mapToTuple() -> (Element, Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!, i.next()!)
    }
    func mapToTuple() -> (Element, Element, Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!, i.next()!, i.next()!)
    }
    
    func safe(at index: Index) -> Element? {
        self.indices.contains(index) ? self[index] : nil
    }
}

struct DP<Argument: Hashable, Element> {
    var dictionary = [Argument: Element]()
    
    var expression: (Argument, (Argument) -> Element) -> Element
    
    init(expression: @escaping (_ argument: Argument, _ note: (Argument) -> Element) -> Element) {
        self.expression = expression
    }
    
    subscript(_ argument: Argument) -> Element {
        mutating _read {
            if let note = dictionary[argument] {
                yield note
            } else {
                let result = expression(argument) { self[$0] }
                dictionary[argument] = result
                yield result
            }
        }
    }
}
//  [swift]
let input = readLine()!.split(separator: " ").map { Int($0)! }

let L = input[0]
let R = input[1]
let d = input[2]

var count = 0
for v in L...R {
  if v % d == 0 {
    count += 1
  }
}
print(count)
//  [swift]
protocol InitFromString {
    init?(_ str: String)
}

extension Int: InitFromString {}
extension Int8: InitFromString {}
extension Int16: InitFromString {}
extension Int32: InitFromString {}
extension Int64: InitFromString {}
extension String: InitFromString {}

func input<T: InitFromString>() -> [T] {
    readLine()!.split(separator: " ").map(String.init).compactMap(T.init)
}

let inputLine: [Int] = input()
let count = (inputLine[0]...inputLine[1]).reduce(into: 0) { (result, i) in
    if i % inputLine[2] == 0 {
        result += 1
    }
}

print(count)
//  [swift]

var a = [[1,2]]
a + [[1]]

func totalUreshisa (rakudaList: [Int], uresiList: [[Int]]) -> Int {
    var total = 0
    for i in 1...rakudaList.count {
        if rakudaList[i-1] <= uresiList[i-1][0] {
            total += uresiList[i-1][1]
        } else {
            total += uresiList[i-1][2]
        }
    }
    return total
}

func allArrayOfRakuda (rakudaNum: Int) -> [[Int]] {
    let rakudaLeft = Array(1...rakudaNum)
    func recursiveF (rakudaLeft: [Int], rakudaList: [Int]) -> [[Int]] {
        var new = [[Int]]()
        if rakudaLeft.count == 0 {
            return [rakudaList]
        }
        for i in 1...rakudaLeft.count {
            var chooseList = rakudaLeft
            let chozen = chooseList.remove(at: i-1)
            new += recursiveF(rakudaLeft: chooseList, rakudaList: rakudaList + [chozen])
        }
        return new
    }
    return recursiveF(rakudaLeft: rakudaLeft, rakudaList: [])
}

func main() {
    let t = Int(readLine()!)!
    for _ in 1...t {
        let n = Int(readLine()!)!
        var uresisa = [[Int]]()
        for _ in 1...n {
            uresisa.append(readLine()!.split(separator: " ").map{Int($0)!})
        }
        var maxUresisa = 0
        for item in allArrayOfRakuda(rakudaNum: n) {
            let aTotalUresisa = totalUreshisa(rakudaList: item, uresiList: uresisa)
            if maxUresisa < aTotalUresisa {
                maxUresisa = aTotalUresisa
            }
            
        }
        print(maxUresisa)
    }
}

main()
//  [swift]
import Foundation
let N = Int(readLine()!)!

func check (_ n:Int) -> Int {
    var count = 0
    for x in 1 ... Int(sqrt(Double(n)))+1 {
        if x*x >= n {
            break
        }
        for y in 1 ... Int(sqrt(Double(n)))+1 {
            if y*y > n || x*y > n{
                break
            }
            for z in 1 ... Int(sqrt(Double(n)))+1 {
                if z*z > n || y*z > n || z*x > n {
                    break
                }
                if x*x+y*y+z*z+x*y+y*z+z*x == n {
                    count += 1
                }
            }
        }
    }
    return count
}

for i in 1 ... N {
    print(check(i))
}
//  [typescript]
import * as fs from "fs"

const judge = (L:number, R:number, d:number) => {
    let ans:number = 0
    for (let i:number = L; i <= R; i ++){
        if (i % d === 0){
            ans ++
        }
    }
    return ans
}

export const main = () => {
    const inp:string[] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n')
    const data:number[] = inp[0].split(' ').map((val:string) => Number(val))


    const L: number = data[0]
    const R: number = data[1]
    const d: number = data[2]
    return  judge(L, R, d)
}

console.log(main())
//  [typescript]
import * as fs from "fs";

// inputで受け取り配列化する
const [L, R, d] = fs.readFileSync("/dev/stdin", "utf8").split(" ").map(Number);

let cnt = 0;

for (let index = L; index <= R; index++) {
  if (index % d === 0) {
    cnt++;
  }
}

console.log(cnt);
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const [L, R, d] = input[0].map(Number);

  let answer = 0;

  for (let i = L; i <= R; i++) {
    if (i % d === 0) {
      answer += 1;
    }
  }

  return answer;
};

console.log(main(read()));
//  [typescript]
const Main = input => {
  const inputArray = input.split(' ');
  const l = inputArray[0];
  const r = inputArray[1];
  const d = inputArray[2];
  const diff = r - l + 1;
  let result = Math.round(diff / d);
  console.log(result);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const Main = input => {
  const inputArray = input.split(' ');
  const l = inputArray[0];
  const r = inputArray[1];
  const d = inputArray[2];
  const diff = r - l + 1;
  let result = Math.floor(diff / d);
  if(r % d == 0) result++;
  console.log(result);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const Main = input => {
  const inputArray = input.split(' ');
  const l = inputArray[0];
  const r = inputArray[1];
  const d = inputArray[2];
  const diff = r - l + 1;
  const result = Math.floor(diff / d);
  console.log(result);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]
r = int(input())

print( 3* r **2 )
//  [python]
r = int(input())
print(3 * r ** 2)
//  [python]
r = int(input())
print(3*r**2)
//  [python]
r = input()
print (3 * r ** 2)
//  [python]
r = input()

print(3*r**2)
//  [python]
r = int(input())
print(r ** 2 * (r - 1))
//  [java]
/*
Stay innocent, be naive. 
But still dream big. 
Dream big to the point that it is beyond your ability and endeavour to achieve it. 
So dream big and don�t lose your innocence.
*/
import java.util.*;
import java.io.*;

   public class Main
   {
      public static void main(String args[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         System.out.println(3*N*N);
      }
      public static void sort(int[] arr)
      {
         //stable heap sort
         PriorityQueue<Integer> pq = new PriorityQueue<Integer>();
         for(int a: arr)
            pq.add(a);
         for(int i=0; i < arr.length; i++)
            arr[i] = pq.poll();
      }
   }
//  [java]
import java.io.*;
import java.util.*;
 
public class Main{
   public static void main(String[] args) {
      MyScanner sc = new MyScanner();
      out = new PrintWriter(new BufferedOutputStream(System.out));
      
      //begin
      out.println((int) (Math.pow(sc.nextInt(), 2)) * 3);
      //end
      out.close();
   }
 
   public static PrintWriter out;
      
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
      long nextLong() {
          return Long.parseLong(next());
      }
      double nextDouble() {
          return Double.parseDouble(next());
      }
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }
   }
}
//  [java]
import java.io.*;
import java.util.*;
class Main{
	static final long MOD = 1_000_000_007; // 10^9+7
    static final int MAX = 2_147_483_646; // intMax 
    static final int INF = 1_000_000_000; // 10^9  
    public static void main(String[] args) throws Exception {
		hayami saori = new hayami();
		int a = saori.saori_hayami();
		System.out.println(3*a*a);
		saori.close();
    }
}

class hayami implements Closeable {
	private final InputStream in = System.in;
	private final byte[] hayami = new byte[1024];
	private int Hayami = 0;
	private int saori = 0;
	private boolean HayamiSaori() {
		if (Hayami < saori) {
			return true;
		}else{
			Hayami = 0;
			try {
				saori = in.read(hayami);
			} catch (IOException e) {
				e.printStackTrace();		
			}
			if (saori <= 0) {
				return false;
			}
		}
		return true;
	}
	private int SaoriHayami() { 
		if (HayamiSaori()) {
            return hayami[Hayami++];
         }else{
             return -1;
         }
	}
	private static boolean hayami_saori(int hayami) { 
		return 33 <= hayami && hayami <= 126;
	}
	public boolean hayamisaori() { 
		while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
	}
	public String nextHayami() {
		if (!hayamisaori()) throw new NoSuchElementException();
		StringBuilder hayamin = new StringBuilder();
		int saori = SaoriHayami();
		while(hayami_saori(saori)) {
			hayamin.appendCodePoint(saori);
			saori = SaoriHayami();
		}
		return hayamin.toString();
	}
	public long saorihayami() {//nextLong
		if (!hayamisaori()) throw new NoSuchElementException();
		long hayami = 0;
		boolean misao = false;
		int saori = SaoriHayami();
		if (saori == '-') {
			misao = true;
			saori = SaoriHayami();
		}
		if (saori < '0' || '9' < saori) {
			throw new NumberFormatException();
		}
		while(true){
			if ('0' <= saori && saori <= '9') {
				hayami *= 10;
				hayami += saori - '0';
			}else if(saori == -1 || !hayami_saori(saori)){
				return misao ? -hayami : hayami;
			}else{
				throw new NumberFormatException();
			}
			saori = SaoriHayami();
		}
	}
	public int saori_hayami() {//nextInt
		long hayami = saorihayami();
		if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
		return (int) hayami;
	}
	public double Hayamin() { //nextDouble
		return Double.parseDouble(nextHayami());
	}
	public void close() {
		try {
			in.close();
		} catch (IOException e) {
		}
    }
    
}
//  [java]
a = []
t = int(input())
for i in range(t):
    a.append(int(input()))

for i in range(t):
    b = a[i]
    del a[i]
    print(max(a))
    a.insert(i,b)
//  [java]
a = []
t = int(input())
s = ""
for i in range(t):
    a.append(int(input()))

for i in range(t):
    b = a[i]
    del a[i]
    print(max(a))
    a.insert(i,b)
//  [java]

import java.util.AbstractMap;
import java.util.Scanner;

public class Main {

     static Scanner scanner;

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

         int N=gi();
         int[] a=new int[N+1];
         int[] b=new int[N+1];

         for(int i=1; i<=N;i++) {
        	 a[i]=gi();
         }


         for (int i=N; i>0; i--) {
        	 int t=0;
        	 for(int j=2*i; j<N;j+=i) {
        		 t+=b[j];
        	 }
        	 if(t%2==a[i]) {
        		 b[i]=0;
        	 } else {
        		 b[i]=1;
        	 }
         }
         int m=0;
         StringBuilder sb=new StringBuilder();
         for(int i=1; i<=N;i++) {
        	 if(b[i]==1) {
        		 if(m!=0)sb.append(" ");
        		 m++;
        		 sb.append(i);
        	 }
         }

         System.out.println(m);
         System.out.println(sb);
     }

     public static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> implements Comparable<Pair<K, V>> {
    		/** serialVersionUID. */
    	    private static final long serialVersionUID = 6411527075103472113L;

    	    public Pair(final K key, final V value) {
    	        super(key, value);
    	    }

    		@Override
    		public int compareTo(Pair<K, V> o) {

    			Comparable key = (Comparable)this.getKey();
    			Comparable key2 = (Comparable)o.getKey();

    			return key.compareTo(key2);
    		}

    	}

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

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

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

     // doubleとして入力を取得
     public static double gd() {
          return Double.parseDouble(scanner.next());
     }
}
//  [cpp]
#include<iostream>
#include<algorithm>
#include <vector>
#include <set>
using namespace std;
long long MOD=1000000007;

int main(){
	int a;
	cin>>a;
	cout<<3*a*a<<endl;
}
//  [cpp]
#include <iostream>
using namespace std;
int main()
{
	int n;
	while(cin>>n)
	cout<<n*n*3<<endl;
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;

int main(){
	int r;
	cin >> r;
	cout << 3*r*r << endl;
	return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

int main() {
  int a; cin >> a;
  cout << 3*a*a*a << endl;
}
//  [cpp]
r=int(input())
print(3*r*r)
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
 

#define     fast()              ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); 
#define     ll                  long long int
#define     test()              ll t; cin>>t; while(t--) 
#define     lp0(i,begin,end)    for(ll i=begin;i<end;i++)
#define     lp1(i,begin,end)    for(ll i=begin;i<=end;i++)
#define     rlp(i,begin,end)    for(ll i=end;i>=begin;i--)
#define     prec(n)             fixed<<setprecision(n)
#define     initial(a,i)        memset(a,i,sizeof(a))
#define     pb                  push_back
#define     PI                  3.1415926535897932384626433832795
#define     MOD                 1000000007
#define     F                   first
#define     S                   second
#define     all(a)              (a).begin(),(a).end()
#define     BPC(x)              __builtin_popcountll(x)
#define     gcd(a,b)            __gcd(a,b)

ll gcd(ll a,ll b) {if (a==0) return b;return gcd(b%a,a);}

ll power(ll x,ll n)
{
    ll result = 1;
    while (n)
    {
        if (n & 1)
            result = result * x;
        n = n / 2;
        x = x * x;
    }
    return result;
}


// Solution Function
void solution(ll compte)
{
    // cout<<compte<<"\n";
    ll n;
    cin >> n;
    cout << 3*n*n << endl;
// Driver Function
int main()
{
    ll compte = 1;
    //test()
    //{
        solution(compte);
        compte++;
    //}
    return 0;
}
//  [c]
#include<stdio.h>
int main(void){
	int r;
	
	scanf("%d",&r);
	printf("%d\n", 3*r*r);
	
	return 0;
}
//  [c]
#include <stdio.h>
int main(void){
    int r;
    scanf("%d",&r);
    r=r*r;
    printf("%d",3*r);
    return 0;
}
//  [c]
#include <stdio.h>

int main(){

    int r, s;

    //input
    scanf("%d", &r);

    //calc
    s = 3* r*r;

    //output
    printf("%d\n", s);

    return 0;
}
//  [c]
#include<stdio.h>
int main() {
        int r,ans;
        scanf("%d",&r);
        ans=3*r*r;
        printf("%d",&ans);
        return 0;
}
//  [c]
/*  ex4_1
    kosaq       */

#include <stdio.h>
#include <math.h>

int main(void){
    double n_tree;//N本の林檎の木をn_treeで定義
    double d_range;//一人は、D本先までを監視できるのでDをd_rangeで定義
    double one_observe;//一人が監視できる林檎の木の数
    int people_number;//N本の林檎の木を監視するために必要な人数の最小値

    scanf("%lf %lf", &n_tree, &d_range);//NとDを入力

    one_observe = d_range * 2 + 1;//一人が監視できる林檎の木の数
    people_number = ceil(n_tree / one_observe);//N本の林檎の木を監視するために必要な人数の最小値は(n_tree / one_observ)eの小数値を切り上げた整数
    printf("%d\n", people_number);//N本の林檎の木を監視するために必要な人数の最小値を出力

    return 0;
}
//  [c]
/* ex4_1
   UMAboogie */

#include<stdio.h>
#include<math.h>

int main(void){
  double apple,range;
  scanf("%lf  %lf",&apple,&range); //りんごの個数と監視の幅を入力
  int watchmen = ceil(apple / (range*2 + 1)); //1人の監視員は監視の幅の2倍に１加えた数のりんごを監視できるので、りんごの数をそれで割り小数点以下、切り上げる
  printf("%d",watchmen); //監視員の人数を出力
  return 0;
}
//  [javascript]
function Main(input) {
  input = input.trim();
  console.log(input*input*3);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
    input = input.trim()
  console.log(input*input*3)
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
var fs = require('fs');
     
var input = fs.readFileSync('/dev/stdin', 'utf8');
var inputNumber = Number(input);

console.log(3 * inputNumber * inputNumber);
//  [javascript]
function Main(input) {
    input = input.trim(
      console.log(input*input*3)
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const fs = require('fs');

const input = (fs.readFileSync('/dev/stdin', 'utf8') as string);
const inputNumber = Number(input);

console.log(3 * inputNumber * inputNumber);
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
	// input1 = input.split('').map((n) => (parseInt(n)))
	// 配列の最初をのぞく
	var arr = input.map((n) => parseInt(n)).filter((n , i) => (i != 0))
	// var arr = input.map((n) => parseInt(n))
	var ans = 0
	arr.forEach((n, i) => {
		// console.log(Math.max(arr.filter((num, s) => (s != i))))
		console.log(arr.filter((num, index) => (index != i)).reduce((nn, ii) => (Math.max(nn, ii))))
	})




	//出力
	// console.log(ans )
}
// *この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
// Main(require('fs').readFileSync('./input.txt', 'utf-8'));
//  [go]
package main
 
import (
	"fmt"
)
 
func pow(x, n, mod int64) int64 {
	if n == 0 {
		return 1
	}
	xx := x * x % mod
	r := pow(xx, n/2, mod)
	if n%2 == 1 {
		r = x * r % mod
	}
	return r
}
 
const mod = 1e9 + 7
 
func main() {
	var n int
	fmt.Scan(&n)
 
	fmt.Println(3 * n * n)
 
}
//  [go]
package main

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

var (
	read  = bufio.NewReader(os.Stdin)
	write = bufio.NewWriter(os.Stdout)
)

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 yesno(result bool) {
	if result {
		fmt.Fprintln(write, "Yes")
	} else {
		fmt.Fprintln(write, "No")
	}
}

func printansStr(result bool, a, b string) {
	if result {
		fmt.Fprintln(write, a)
	} else {
		fmt.Fprintln(write, b)
	}
}

func printansInt(result bool, a, b int) {
	if result {
		fmt.Fprintln(write, a)
	} else {
		fmt.Fprintln(write, b)
	}
}

func main() {
	defer write.Flush()

	var a int
	fmt.Fscan(read, &a)
	fmt.Fprintln(write, 3*a*a)
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	var d int
	fmt.Scan(&d)

	ans := n / ((2 * d) + 1)
	if ans*((2*d)+1) != n {
		fmt.Print(ans + 1)
		return
	}
	fmt.Print(ans)
}
//  [go]
package main

import (
	"fmt"
)

type ll int64


func main() {

	var N int
	fmt.Scan(&N)


	a := make([]int, N+1)
	ans := 0
	ans_slice := make([]int,N+1)


	for i := 0 ; i < N ;i++ {
		//1 origin
		fmt.Scan(&a[i+1])
	}

	ans_flag := 0
	for i:= N; i > 0 ; i--  {//Nから1まで

		k:= i
		j := 1
		ans_flag = 0

		for k <= N  {
			ans_flag += a[k]
			j++
			k = i * j
		}


		if ans_flag % 2 != 0 {//2で割り切れない
			ans++
			ans_slice[i] = 1
		}

	}






	fmt.Println(ans)
	for i:=1;i <=N ;i++  {
		if ans_slice[i] == 1 {
			fmt.Print(i)
			//fmt.Print(" ")
		}
	}
	//fmt.Println("")

}
//  [go]
package main

import "fmt"

func main() {
	var r int
	fmt.Scanf("%d",r)
	
	fmt.Printf("%d",3 * r * r)
}
//  [ruby]
r=gets.chomp.to_i
p 3*r*r
//  [ruby]
r = gets.to_i
puts 3 * r * r
//  [ruby]

# describe Abc134A do
#   context 'test' do
#     it 'sample' do
#       expect(Abc134A.calc(4)).to be(48)
#       expect(Abc134A.calc(15)).to be(675)
#       expect(Abc134A.calc(80)).to be(19200)
#     end
#   end
# end

class Abc134A
  def self.input()
    password_string = STDIN.gets.to_i
  end

  def self.output(result)
    puts result
  end

  def self.calc(r)
    3 * r * r
  end

  def self.main()
    r = input()
    result = calc(r)
    output(result)
  end
end

if __FILE__ == $0
  Abc134A.main
  exit
end
//  [ruby]
puts 3*(gets.to_i)**3
//  [ruby]
N = gets.to_i
A = readlines.map(&:to_i)

tmp = []

N.times do |ai|

	tmp = A.dup
	tmp.delete_at(ai)
	puts tmp.max

end
//  [ruby]
n,d=gets.split.map(&:to_i)
p (n+2*d)/(2*d+1)
//  [rust]
use std::io::*;

fn main() {
    let mut s: String = String::new();
    stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();

    let r: usize = itr.next().unwrap().parse().unwrap();
    println!("{}", 3 * r * r);
}
//  [rust]
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

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

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

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

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

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

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

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}


fn f(s: &Vec<i32>) -> bool{

    


    return true;
}

use std::iter::Iterator;
use std::cmp;


fn main() {
    input! {
        r : i32,
    }

    println!("{}", 3 * r * r);


}
//  [rust]
use std::cmp;

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

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

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

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

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

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

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

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

fn main() {
    input! {
    	a:usize,
    }
       
    println!("{}", 3*a*a);
}
//  [rust]
fn main() {
  let r = {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim_end().parse::<i64>().unwrap()
  };

  print!("{}", 3 * r * r);
}
//  [rust]
use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;

#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

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

fn main(){
    let n: usize = read_as_vec()[0];
    let a: Vec<i32> = read_as_vec();
    
    //if status[i] == true, we put a ball into ith box
    let mut status: Vec<bool> = vec![false;n];

    for i in (0..n).rev(){
        //println!("i = {}, a[i] = {}", i, a[i]);
        let mut sum = 0;
        for j in i+1..n{
            if (j+1)%(i+1) == 0 && status[j]{
                sum += 1;
            }
        }
        
        if (sum%2 == 0 && a[i] == 1) || (sum%2 == 1 && a[i] == 0){
            status[i] = true;
        }
        //println!("{:?}", status);
    }
    let num_balls = status.iter().filter(|x| **x == true).count();
    println!("{}", num_balls);
    
    if num_balls == 0{
        return;
    }
    
    for (i, is_ball) in status.iter().enumerate(){
        if *is_ball{
            print!("{} ", i+1);
        }
    }
    println!("");
}
//  [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 n: i32 = read();
    let mut vec: Vec<i32> = vec![];
    for _ in 0..n {
        vec.push(read());
    }
    let mut rev_ans = vec![0; vec.len()];
    let mut m = 0;
    let mut ans = vec![];
    for (i_1, _) in vec.iter().enumerate().rev() {
        let i = i_1 + 1;
        let mut sum = 0;
        for j in 1..(vec.len() / i) {
            sum += rev_ans[(i * j) - 1];
        }
        if sum % 2 == vec[i_1] {
            rev_ans[i_1] = 0;
        } else {
            rev_ans[i_1] = 1;
            ans.push(i);
            m += 1;
        }
    }
    println!("{}", m);
    println!(
        "{}",
        ans.iter()
            .map(|i| i.to_string())
            .collect::<Vec<String>>()
            .join(" ")
    );
}
//  [swift]
let r=Int(readLine()!)!
print(3*r*r)
//  [swift]
let a=(Int)(readLine()!)!
print(a*a*3)
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let r = Int(readLine()!)!
    
    print(3 * r * r)
}

main()
//  [swift]
let r=Int(readLine()!)
print(3*r*r)
//  [swift]
let r=Int(readLine()!)
print(3*pow(r,2))
//  [swift]
let r=Int(readLine()!)
print(3*r**2)
//  [typescript]
import * as fs from 'fs'

//in
// 4
//out
// 48
// 3a2
const main = (inp: string) => {

    const r :number = parseInt(inp);

    console.log(3*r**2);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());
//  [typescript]
'use strict'
const main = (input: string) => {
    const r: number = Number(input)
    console.log( 3 * r ** 2);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
export class Main {
  static main(input): string {
    const tmp: string[] = input.split("\n");
    const t: number = tmp[0].split(" ").map(int => parseInt(int))[0];
    return `${3 * t * t}`;
  }
}
 console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  const r = Number(lines[0]);
  console.log(2 * (r ** 2));
});
//  [python]
n = int(input())
xy = []
for i in range(n):
    xy.append(list(map(int, input().split())))
xy.sort(key = lambda x: x[1])
xy.sort()
if n == 1:
    print(1)
else:
    dif = []
    for i in range(n):
        for j in range(i + 1, n):
            dif.append((xy[j][0] - xy[i][0], xy[j][1] - xy[i][1]))
    count_dif = {}
    for i in dif:
        count_dif.setdefault(i, 0)
        count_dif[i] += 1
    print(n - max(count_dif.values()))
//  [python]
N = list(map(int, input().split()))
d = {0:0}

pos=[]
for x in range(N[0]):
    a = list(map(int, input().split()))
    for y in pos:
        key = (a[0]-y[0])*(10**11)+(a[1]-y[1])
        if key<0:
            key=-key
        if key not in d.keys():
            d[key] = 0
        d[key] += 1
    pos.append(a)
    
print(N[0]-max(d.values()))
//  [python]
n=int(input())
if n==1:
	print(1)
	exit()
xy = sorted([list(map(int,input().split())) for i in range(n)])
p=q=0
ans=0
dic={}
for i in range(n-1):
	for j in range(i+1,n):
		p = xy[j][0]-xy[i][0]
		q = xy[j][1]-xy[i][1]
		if (p,q) in dic:
			dic[(p,q)]+=1
		else:
			dic[(p,q)]=1
print(n-max(dic.values()))
//  [python]
n=int(input())
l=[]
if n==1:
  print(1)
else:
  for i in range(n):
    x,y=map(int,input().split())
    l.append([x,y])

  dic={}
  for i in range(n):
    for j in range(i+1,n):
      dx,dy = l[j][0]-l[i][0],l[j][1]-l[i][1]
      if (dx,dy) not in dic:
        dic[dx,dy]=1
      else:
        dic[dx,dy]+=1

  dic=sorted(dic.items(),key=lambda x:x[1],reverse=True)
  print(n-dic[0][1])
//  [python]
import sys, math, re
from itertools import accumulate
sys.setrecursionlimit(10**9)

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N = ii()
    x, y = i2(N)
    d = {}

    for i in range(N):
        for j in range(N):
            if i == j:
                continue

            pair = (x[i]-x[j], y[i]-y[j])
            if not pair in d:
                d[pair] = 0
            
            d[pair] += 1

    print(N-max(d.values()))


if __name__ == "__main__":
    main()
//  [python]
import sys, math, re
from itertools import accumulate
sys.setrecursionlimit(10**9)

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N = ii()
    x, y = i2(N)
    ans = -1

    s = set()
    for i in range(N):
        for j in range(N):
            if i != j:
                s.add((x[i]-x[j], y[i]-y[j]))

    for p, q in s:
        cnt = 0
        for i in range(N):
            for j in range(N):
                if i == j:
                    continue
                if x[i]-x[j] == p and y[i]-y[j] == q:
                    cnt += 1
        ans = max(ans, cnt)

    print(N-ans)


if __name__ == "__main__":
    main()
//  [java]
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(N==1) {
			System.out.println(1);
			return ;
		}
		Main main = new Main();
		long x[]= new long[N];
		long y[] = new long[N];
		for (int i=0;i<N;i++) {
			x[i] = sc.nextLong();
			y[i] = sc.nextLong();
		}
		int max =1;
		Map<Point,Integer> map = new HashMap<Point,Integer>();
		for (int i=0;i<N;i++) {
			for (int j=i+1;j<N;j++) {
				if (i!=j) {
					Point t = main.new Point();
					t.p=Math.abs(x[j]-x[i]);
					t.q=Math.abs(y[j]-y[i]);
					if (map.containsKey(t)==false) {
						map.put(t, 1);
					} else {
						Integer in = map.get(t);
						map.put(t, in+1);
						if (in +1>max) {
							max = in +1;
						}
					}
				}

			}
		}
		System.out.println(N-max);
	}

	public class Point extends Object{
		long p;
		long q;

		@Override
		public boolean equals(Object o) {
			Point p = (Point)o;
			if (p.p==this.p&&p.q==this.q) {
				return true;
			}
			return false;
		}

		@Override
		public int hashCode() {
			return (int)(this.p%1000000+this.q%1000000);
		}

	}

}
//  [java]
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		Main main = new Main();
		long x[]= new long[N];
		long y[] = new long[N];
		for (int i=0;i<N;i++) {
			x[i] = sc.nextLong();
			y[i] = sc.nextLong();
		}
		int max =1;
		Map<Point,Integer> map = new HashMap<Point,Integer>();
		for (int i=0;i<N;i++) {
			for (int j=0;j<N;j++) {
				if (i!=j) {
					Point t = main.new Point();
					t.p=x[j]-x[i];
					t.q=y[j]-y[i];
					if (map.containsKey(t)==false) {
						map.put(t, 1);
					} else {
						Integer in = map.get(t);
						map.put(t, in+1);
						if (in +1>max) {
							max = in +1;
						}
					}
				}

			}
		}
		System.out.println(N-max);
	}

	public class Point extends Object{
		long p;
		long q;

		@Override
		public boolean equals(Object o) {
			Point p = (Point)o;
			if (p.p==this.p&&p.q==this.q) {
				return true;
			}
			return false;
		}

		@Override
		public int hashCode() {
			return (int)(this.p%1000000+this.q%1000000);
		}

	}

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

using namespace std;

typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ldbl;
typedef pair<int, int> pii;
typedef pair<uint, uint> puu;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;
typedef pair<double, double> pdd;
typedef vector<int> vi;
typedef vector<uint> vu;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<pii> vpii;
typedef vector<puu> vpuu;
typedef vector<pll> vpll;
typedef vector<pull> vpull;
typedef vector<string> vstr;
typedef vector<double> vdbl;
typedef vector<ldbl> vldbl;
#define pb push_back
#define ppb pop_back
#define pfr push_front
#define ppfr pop_front
#define emp emplace
#define empb emplace_back
#define be begin
#define rbe rbegin
#define all(x) (x).be(), (x).end()
#define rall(x) (x).rbe(), (x).rend()
#define fir first
#define sec second
#define mkp make_pair
#define brif(cond) if (cond) break
#define ctif(cond) if (cond) continue
#define retif(cond) if (cond) return
void canhazfast() {ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);}
template<typename T> T gcd(T a, T b) {return b ? gcd(b, a%b) : a;}
template<typename T> T extgcd(T a, T b, T &x, T &y)
{
    T x0 = 1, y0 = 0, x1 = 0, y1 = 1;
    while (b) {
        T q = a/b; a %= b; swap(a, b);
        x0 -= q*x1; swap(x0, x1);
        y0 -= q*y1; swap(y0, y1);
    }
    x = x0; y = y0; return a;
}
int ctz(uint x) {return __builtin_ctz(x);}
int ctzll(ull x) {return __builtin_ctzll(x);}
int clz(uint x) {return __builtin_clz(x);}
int clzll(ull x) {return __builtin_clzll(x);}
int popcnt(uint x) {return __builtin_popcount(x);}
int popcntll(ull x) {return __builtin_popcountll(x);}
int bsr(uint x) {return 31^clz(x);}
int bsrll(ull x) {return 63^clzll(x);}

#define x fir
#define y sec

pii p[64];

int main()
{
    canhazfast();

    int n, ans = 0;
    map<pii, int> mp;

    cin >> n;
    for (int i = 0; i < n; ++i) cin >> p[i].x >> p[i].y;
    sort(p, p+n);
    for (int i = 1; i < n; ++i) {
        for (int j = 0; j < i; ++j) {
            int dx = p[i].x-p[j].x, dy = p[i].y-p[j].y;
            ++mp[{dx, dy}];
        }
    }
    for (const auto &e : mp) ans = max(ans, e.sec);
    ans = n-ans;
    cout << ans << '\n';

    return 0;
}
//  [cpp]
#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
using namespace std;
typedef long long ll;

int main() {
    int n, x[55], y[55];
    cin >> n;
    for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
    
    vector<pair<int, int>> v;
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            v.emplace_back(x[i] - x[j], y[i] - y[j]);
            v.emplace_back(-x[i] + x[j], -y[i] + y[j]);
        }
    }
    
    if (n == 1) {
        cout << 1 << endl;
        return 0;
    }
    
    sort(v.begin(), v.end());
    
    int tmp = 1, mx = 1;
    for (int i = 0; i < v.size() - 1; i++) {
        if (v[i].first == v[i + 1].first && v[i].second == v[i + 1].second) tmp++;
        else tmp = 1;
        mx = max(mx, tmp);
    }
    
    cout << n - mx << endl;
    
}