#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > grafo;
vector<vector<int> > grafoAux;
int help[223456];
int n, m;
int used[223456], vis = 1;
int visited[223456];
int removeNo(int at) {
  int a = grafoAux[at][0];
  for (int i = 0, sz = grafoAux[a].size(); i < sz; i++) {
    if (grafoAux[a][i] == at) {
      swap(grafoAux[a][i], grafoAux[a].back());
      grafoAux[a].pop_back();
      if (!help[a] && grafoAux[a].size() == 1)
        return a;
      else
        return -1;
    }
  }
  return -1;
}
void buildGrafoAux() {
  set<int> st;
  for (int i = 0; i < n; i++) {
    if (!help[i] && grafoAux[i].size() == 1) {
      st.insert(i);
    }
  }
  while (!st.empty()) {
    int at = *(st.begin());
    visited[at] = 1;
    int ret = removeNo(at);
    st.erase(st.begin());
    if (ret != -1) st.insert(ret);
  }
}
pair<int, int> bfs(int u) {
  queue<pair<int, int> > fila;
  vis++;
  fila.push(make_pair(u, 0));
  int dist = -1, idx = 0;
  used[u] = vis;
  while (!fila.empty()) {
    pair<int, int> at = fila.front();
    u = at.first;
    fila.pop();
    if (at.second > dist) {
      dist = at.second;
      idx = u;
    } else if (at.second == dist)
      idx = min(idx, u);
    for (int i = 0, sz = grafo[u].size(); i < sz; i++) {
      int v = grafo[u][i];
      if (used[v] != vis) {
        used[v] = vis;
        fila.push(make_pair(v, at.second + 1));
      }
    }
  }
  return make_pair(idx, dist);
}
int main() {
  ios::sync_with_stdio(false);
  int de, para, k;
  cin >> n >> m;
  grafoAux.resize(n + 10);
  grafo.resize(n + 10);
  vector<pair<int, int> > arestas;
  for (int i = 0; i < n - 1; i++) {
    cin >> de >> para;
    de--;
    para--;
    grafoAux[de].push_back(para);
    grafoAux[para].push_back(de);
    arestas.push_back(make_pair(de, para));
  }
  int st = 1e9;
  for (int i = 0; i < m; i++) {
    cin >> k;
    st = min(st, k - 1);
    help[k - 1] = 1;
  }
  buildGrafoAux();
  unsigned long long ans = 0LL;
  for (int i = 0; i < n - 1; i++) {
    if (!visited[arestas[i].first] && !visited[arestas[i].second]) {
      int de = arestas[i].first;
      int para = arestas[i].second;
      ans++;
      grafo[de].push_back(para);
      grafo[para].push_back(de);
    }
  }
  pair<int, int> lo = bfs(st);
  pair<int, int> hi = bfs(lo.first);
  cout << min(hi.first + 1, lo.first + 1) << "\n"
       << ((ans - hi.second) * 2LL) + hi.second << '\n';
  return 0;
}
