#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;



int main() {
    int n, m;
    cin >> n >> m;
    vector<int> a(m), b(m);
    for (int i = 0; i < m; ++i) {
        scanf("%d %d", &a[i], &b[i]);
        a[i]--; b[i]--;
    }
    vector<int> c(n);
    for (auto &&i : c) scanf("%d", &i);
    vector<vector<pair<int, int>>> G(n);
    vector<int> ans(m, -1);
    for (int i = 0; i < m; ++i) {
        if(c[a[i]] == c[b[i]]){
            G[a[i]].emplace_back(b[i], 2*i);
            G[b[i]].emplace_back(a[i], 2*i+1);
        }else {
            ans[i] = c[a[i]] < c[b[i]];
        }
    }
    vector<int> used(m);
    vector<int> visited(n), p(n, -1);
    auto dfs = [&](int x, int p, auto &&f) -> void {
        visited[x] = 1;
        for (auto &[y, id] : G[x]) {
            if(p == y || used[id/2]) continue;
            ans[id/2] = id%2;
            used[id/2] = 1;
            if(!visited[y]){
                visited[y] = 1;
                f(y, x, f);
            }

        }
    };
    for (int i = 0; i < n; ++i) {
        if(!visited[i]) dfs(i, -1, dfs);
    }
    for (int i = 0; i < m; ++i) {
        if(!ans[i]) printf("->\n");
        else printf("<-\n");
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
int X[111], Y[111], fa[111];
int ffa(int x) {
  if (x == fa[x]) return x;
  return fa[x] = ffa(fa[x]);
}
void merge(int x, int y) {
  x = ffa(x);
  y = ffa(y);
  fa[x] = y;
}
struct NODE {
  int a, b;
  double d;
  NODE(int a1 = 0, int a2 = 0, double a3 = 0) : a(a1), b(a2), d(a3) {}
  bool operator<(const NODE &P) const {
    return d < P.d;
  }
};
int n;
int main() {
#ifdef LOCAL
  freopen(".a.in", "r", stdin);
#endif
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> X[i] >> Y[i];
  int S = n, T = n + 1;
  for (int i = 0; i <= T; ++i) fa[i] = i;
  vector<NODE> F;
  F.emplace_back(S, T, 200);
  for (int i = 0; i < n; ++i) {
    F.emplace_back(i, S, abs(Y[i] - 100));
    F.emplace_back(i, T, abs(Y[i] + 100));
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      F.emplace_back(i, j, sqrt((X[i] - X[j]) * (X[i] - X[j]) + (Y[i] - Y[j]) * (Y[i] - Y[j])));
    }
  }
  sort(F.begin(), F.end());
  for (int i = 0; i < (int)F.size(); ++i) {
    merge(F[i].a, F[i].b);
    if (ffa(S) == ffa(T)) {
      cout << fixed << setprecision(10) << F[i].d / 2.0 << "\n";
      return 0;
    }
  }
  return 0;
}
