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

public class NopeaEtaisyys {
    public static class Piste {
        double x, y;

        public Piste(double x, double y) {
            this.x = x;
            this.y = y;
        }

        public double etaisyys(Piste toinen) {
            return Math.sqrt(Math.pow(x-toinen.x,2)+Math.pow(y-toinen.y,2));
        }
    }

    public static Comparator<Piste> xJarjestys = new Comparator<Piste>() {
        public int compare(Piste a, Piste b) {
            if (a.x < b.x) return -1;
            if (a.x > b.x) return 1;
            return 0;
        }
    };

    public static Comparator<Piste> yJarjestys = new Comparator<Piste>() {
        public int compare(Piste a, Piste b) {
            if (a.y < b.y) return -1;
            if (a.y > b.y) return 1;
            return 0;
        }
    };

    public static ArrayList<Piste> pisteet = new ArrayList<Piste>();
    public static TreeSet<Piste> ikkuna = new TreeSet<Piste>(yJarjestys);

    public static void main(String[] args) throws Exception {
        Scanner lukija = new Scanner(new File("pisteet.txt"));
        while (lukija.hasNext()) {
            double x = Double.parseDouble(lukija.next());
            double y = Double.parseDouble(lukija.next());
            pisteet.add(new Piste(x, y));
        }
        Collections.sort(pisteet, xJarjestys);
        double pienin = pisteet.get(0).etaisyys(pisteet.get(1));
        int vasen = 0, oikea = 0;
        while (oikea < pisteet.size()) {
            Piste uusi = pisteet.get(oikea);
            oikea++;
            while (true) {
                Piste vanha = pisteet.get(vasen);
                if (uusi.x-vanha.x > pienin) {
                    ikkuna.remove(vanha);
                    vasen++;
                } else {
                    break;
                }
            }
            SortedSet<Piste> naapurit = ikkuna.subSet(new Piste(0,uusi.y-pienin), new Piste(0,uusi.y+pienin));
            for (Piste piste : naapurit) {
                pienin = Math.min(pienin, uusi.etaisyys(piste));
            }
            ikkuna.add(uusi);
        }
        System.out.println(pienin);
    }
}
