#include <bits/stdc++.h>
using namespace std;
const double PI = 2 * acos(0.0);
vector<vector<int> > grafo;
vector<int> quantosTem;
vector<int> altura;
vector<bool> tem;
vector<int> vet;
int dfs(int v, int pai) {
  if (int(grafo[v].size()) == 1 && pai != -1) {
    quantosTem[v] = tem[v] ? 2 : 0;
    altura[v] = 0;
    return v;
  } else {
    int max = -1;
    int vMax = v;
    for (int i = 0; i < int(grafo[v].size()); ++i) {
      int u = grafo[v][i];
      if (u == pai) continue;
      int w = dfs(u, v);
      if (quantosTem[u] != 0) {
        if (altura[u] > max) {
          max = altura[u];
          vMax = w;
        } else if (altura[u] == max && w < vMax) {
          vMax = w;
        }
        quantosTem[v] += quantosTem[u];
      }
    }
    if (quantosTem[v] != 0) quantosTem[v] += 2;
    if (quantosTem[v] == 0 && tem[v]) {
      quantosTem[v] += 2;
    }
    altura[v] = max + 1;
    return vMax;
  }
}
int main(void) {
  int N, M;
  cin >> N >> M;
  grafo.resize(N);
  for (int i = 0, u, v; i < N - 1; ++i) {
    cin >> u >> v;
    grafo[u - 1].push_back(v - 1);
    grafo[v - 1].push_back(u - 1);
  }
  vet.resize(M);
  tem.resize(N);
  for (int i = 0; i < M; ++i) {
    cin >> vet[i];
    vet[i]--;
    tem[vet[i]] = true;
  }
  quantosTem.resize(N);
  altura.resize(N);
  int v = dfs(vet[0], -1);
  int total = quantosTem[vet[0]] - 2;
  altura.clear();
  altura.resize(N);
  int w = dfs(v, -1);
  total -= altura[v];
  cout << (w < v ? w : v) + 1 << endl;
  cout << total << endl;
  return 0;
}
