#include <bits/stdc++.h>
using namespace std;
const int maxN = 130000;
long long int n, m, mx, adad, ans, dpd[maxN], dpu[maxN], mx1[maxN], mx2[maxN],
    tans;
bool mrk[maxN];
vector<long long int> g[maxN];
void input() {
  cin >> n >> m;
  for (long long int i = 1; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (long long int i = 1; i <= m; i++) {
    long long int x;
    cin >> x;
    adad = x;
    mrk[x] = true;
  }
}
void dfs1(long long int v, long long int p) {
  for (long long int i = 0; i < g[v].size(); i++) {
    long long int u = g[v][i];
    if (p != u) {
      dfs1(u, v);
      mrk[v] |= mrk[u];
    }
  }
}
void dfsd(long long int v, long long int p) {
  for (long long int i = 0; i < g[v].size(); i++) {
    long long int u = g[v][i];
    if (p != u && mrk[u]) {
      dfsd(u, v);
      dpd[v] = max(dpd[v], dpd[u] + 1);
      if (dpd[u] >= dpd[mx1[v]]) {
        swap(mx1[v], mx2[v]);
        mx1[v] = u;
      } else if (dpd[u] >= mx2[v])
        mx2[v] = u;
    }
  }
}
void dfsu(long long int v, long long int p) {
  for (long long int i = 0; i < g[v].size(); i++) {
    long long int u = g[v][i];
    if (p != u && mrk[u]) {
      dpu[u] = dpu[v] + 1;
      if (mx1[v] != u) dpu[u] = max(dpu[u], dpd[v] + 1);
      if (mx2[v] > 0) dpu[u] = max(dpu[u], dpd[mx2[v]] + 2);
      dfsu(u, v);
    }
  }
}
int main() {
  input();
  dfs1(adad, 0);
  dfsd(adad, 0);
  dfsu(adad, 0);
  for (long long int i = 0; i <= n; i++) {
    if (mrk[i]) ans++;
    if (mrk[i]) mx = max(mx, dpd[i] + dpu[i]);
  }
  for (long long int i = 0; i <= n; i++) {
    if (mrk[i] && (dpd[i] == mx || dpu[i] == mx)) {
      cout << i << endl;
      break;
    }
  }
  ans--;
  cout << (2 * ans) - mx << endl;
}
