#include <bits/stdc++.h>
using namespace std;
vector<int> g[123459];
vector<int> tis, ans, att;
int n, m;
int is_att(int v, int p) {
  tis[v] = att[v];
  for (int i = 0; i < g[v].size(); ++i) {
    int x = g[v][i];
    if (x != p) {
      tis[v] = tis[v] | is_att(x, v);
    }
  }
  return tis[v];
}
pair<int, int> find_diameter(int v, int p, int s) {
  pair<int, int> res(v, s), cur;
  for (int i = 0; i < g[v].size(); ++i) {
    int to = g[v][i];
    if (to != p && tis[to]) {
      cur = find_diameter(to, v, s + 1);
      if (cur.second > res.second) {
        res = cur;
      }
      if (cur.second == res.second && cur.first < res.first) {
        res = cur;
      }
    }
  }
  return res;
}
void solve() {
  cin >> n >> m;
  ans.resize(n + 1, 0);
  att.resize(n + 1, 0);
  tis.resize(n + 1, 0);
  int a, b;
  for (int i = 0; i < n - 1; ++i) {
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  if (m == 1) {
    cin >> a;
    cout << a << endl;
    cout << 0 << endl;
    return;
  }
  for (int i = 0; i < m; ++i) {
    scanf("%d", &a);
    att[a] = 1;
  }
  is_att(a, -1);
  int res = 0, place = 0;
  for (int i = 1; i <= n; ++i) {
    if (tis[i]) {
      res += 2;
    }
  }
  res -= 2;
  pair<int, int> fst = find_diameter(a, -1, 0);
  pair<int, int> scnd = find_diameter(fst.first, -1, 0);
  cout << min(fst.first, scnd.first) << endl;
  cout << res - scnd.second << endl;
}
int main() {
  solve();
  return 0;
}
