#include <bits/stdc++.h>
using namespace std;
void printVector(vector<int> a) {
  for (int ii = 0; ii < a.size(); ii++) cout << a[ii] << endl;
}
std::vector<vector<int> > edges;
int dp[123457];
int marked[123457];
int n, m;
struct MinPair {
  pair<int, int> first, second;
  MinPair() {
    first = pair<int, int>(0, 1 << 29);
    second = pair<int, int>(0, 1 << 29);
  }
  void push(int dist, int ind) {
    if (first.first < dist) {
      swap(first, second);
      first = pair<int, int>(dist, ind);
    } else if (first.first == dist) {
      if (first.second > ind) {
        swap(first, second);
        first = pair<int, int>(dist, ind);
      } else
        second = pair<int, int>(dist, ind);
    } else {
      if (second.first < dist) {
        second = pair<int, int>(dist, ind);
      } else if (second.second == ind) {
        second.second = min(second.second, ind);
      }
    }
  }
  pair<int, int> findMax() { return first; }
  pair<int, int> findMin() { return second; }
};
MinPair dpEnpoints[1][123457];
void dfs(int u, int par) {
  for (auto v : edges[u]) {
    if (v == par) continue;
    dfs(v, u);
    marked[u] += marked[v];
  }
  return;
}
void dfs1(int u, int par) {
  dpEnpoints[0][u].push(0, u);
  for (auto v : edges[u]) {
    if (v == par) continue;
    dfs1(v, u);
    if (marked[v] > 0) {
      dpEnpoints[0][u].push(dpEnpoints[0][v].findMax().first + 1, v);
    }
  }
  return;
}
void dfs2(int u, int par) {
  if (u > 1 && marked[u] < m) {
    pair<int, int> Max = dpEnpoints[0][par].findMax();
    pair<int, int> Min = dpEnpoints[0][par].findMin();
    if (Max.second != u)
      dpEnpoints[0][u].push(Max.first + 1, par);
    else
      dpEnpoints[0][u].push(Min.first + 1, par);
  }
  for (auto v : edges[u]) {
    if (v == par) continue;
    dfs2(v, u);
  }
  return;
}
int dfs3(int u, int par) {
  int res = 0;
  for (auto v : edges[u]) {
    if (v == par) continue;
    if (marked[v] == 0) continue;
    res += dfs3(v, u) + 2;
  }
  return res;
}
vector<int> haunted;
int main() {
  cin >> n >> m;
  edges.assign(n + 1, vector<int>());
  int u, v;
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d %d", &u, &v);
    edges[u].push_back(v);
    edges[v].push_back(u);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &u);
    haunted.push_back(u);
    marked[u] = 1;
  }
  if (m == 1) {
    cout << haunted[0] << endl;
    cout << 0 << endl;
    return 0;
  }
  dfs(1, 0);
  dfs1(1, 0);
  dfs2(1, 0);
  memset(marked, 0, sizeof(marked));
  for (int i = 1; i <= m; i++) marked[haunted[i - 1]] = 1;
  int ans = 0, ind = 1;
  for (int i = 1; i <= n; i++) {
    if (marked[i] == 0) continue;
    pair<int, int> Max = dpEnpoints[0][i].findMax();
    if (ans < Max.first) ans = Max.first, ind = i;
  }
  dfs(ind, 0);
  ans = dfs3(ind, 0) - ans;
  cout << ind << endl;
  cout << ans << endl;
  return 0;
}
