#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 123456;
vector<int> E[N];
int special[N];
int dist[N], par[N];
bitset<N> dead;
void dfs(int s, int d = 0, int p = -1) {
  dist[s] = d;
  par[s] = p;
  for (const int &to : E[s]) {
    if (p != to) {
      dfs(to, d + 1, s);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    E[x].push_back(y);
    E[y].push_back(x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    x--;
    special[x] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (special[i]) {
      dfs(i);
      break;
    }
  }
  int u, v;
  int mx = -1;
  for (int i = 0; i < n; i++) {
    if (special[i] && dist[i] > mx) {
      u = i;
      mx = dist[i];
    }
  }
  dfs(u);
  mx = -1;
  for (int i = 0; i < n; i++) {
    if (special[i] && dist[i] > mx) {
      mx = dist[i];
      v = i;
    }
  }
  u = min(u, v);
  dfs(u);
  LL res = -mx;
  priority_queue<pair<int, int>> pq;
  for (int i = 0; i < n; i++) {
    if (special[i]) {
      pq.push(make_pair(dist[i], i));
    }
  }
  while (!pq.empty()) {
    int x = pq.top().second;
    pq.pop();
    while (par[x] != -1 && !dead[x]) {
      dead[x] = 1;
      res += 2;
      x = par[x];
    }
  }
  cout << u + 1 << "\n";
  cout << res << endl;
}
