#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <class T>
void mxi(T& a, const T& b) {
  a = max(a, b);
}
template <class T>
void mni(T& a, const T& b) {
  a = min(a, b);
}
long double EPS = 1e-9;
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count());
struct node {
  int mx1, mx2, dense, sparse;
  bool has;
  node() {
    mx1 = mx2 = dense = sparse = 0;
    has = false;
  }
};
node dp[200200], odp[200200];
int ar[200200];
vector<vector<int> > g;
void dfs(int nn, int pp) {
  if (ar[nn]) dp[nn].has = true;
  multiset<int> mt;
  for (auto x : g[nn]) {
    if (x != pp) {
      dfs(x, nn);
      dp[nn].has |= dp[x].has;
      if (dp[x].has)
        dp[nn].dense += 2 + dp[x].dense,
            mt.insert(-1 - dp[x].dense + dp[x].sparse);
    }
  }
  if ((long long)(mt).size()) {
    int k = *mt.begin();
    mt.erase(mt.find(k));
    dp[nn].sparse = dp[nn].dense + k;
    dp[nn].mx1 = k;
    if ((long long)(mt).size()) dp[nn].mx2 = *mt.begin();
  }
}
void dfs2(int nn, int pp) {
  if (pp) {
    if (odp[pp].has || dp[pp].mx2 || ar[pp]) {
      odp[nn].has = true;
      odp[nn].dense = odp[pp].dense + dp[pp].dense - dp[nn].dense;
      if (dp[nn].has == 0) odp[nn].dense += 2;
      odp[nn].sparse = odp[pp].sparse + 1 + dp[pp].dense - dp[nn].dense;
      if (dp[pp].mx1 == -1 - dp[nn].dense + dp[nn].sparse) {
        odp[nn].sparse = min(odp[nn].sparse, odp[pp].dense + 1 + dp[pp].dense -
                                                 dp[nn].dense + dp[pp].mx2);
        if (dp[nn].has) odp[nn].sparse -= 2;
      } else {
        odp[nn].sparse = min(odp[nn].sparse, odp[pp].dense + 1 + dp[pp].dense -
                                                 dp[nn].dense + dp[pp].mx1);
        if (dp[nn].has) odp[nn].sparse -= 2;
      }
    }
  }
  for (auto x : g[nn])
    if (x != pp) dfs2(x, nn);
}
void solve() {
  int n, m;
  cin >> n >> m;
  g.resize(n + 1);
  for (int i = 0; i < (n - 1); i++) {
    int u, v;
    cin >> u >> v;
    g[u].emplace_back(v);
    g[v].emplace_back(u);
  }
  for (int i = 0; i < (m); i++) {
    int id;
    cin >> id;
    ar[id]++;
  }
  dfs(1, 0);
  dfs2(1, 0);
  int ans = 1e9;
  for (int i = 1; i <= n; i++)
    if (ar[i])
      ans =
          min({ans, dp[i].sparse + odp[i].dense, dp[i].dense + odp[i].sparse});
  int city;
  for (int i = 1; i <= n; i++)
    if (min(dp[i].sparse + odp[i].dense, dp[i].dense + odp[i].sparse) == ans) {
      city = i;
      break;
    }
  cout << city << '\n';
  cout << ans << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, tab;
  t = 1;
  tab = t;
  while (t--) {
    solve();
  }
  cerr << ((double)clock() / CLOCKS_PER_SEC);
}
