#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
int dr[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int dc[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int dh[4] = {0, 1, 0, -1};
int dv[4] = {-1, 0, 1, 0};
int d[200500], sz[200500], mrk[200500];
vector<int> adj[200500];
void dfs(int p, int v) {
  if (mrk[v])
    sz[v] = 1;
  else
    sz[v] = 0;
  int i;
  for (i = 0; i < adj[v].size(); i++) {
    int x = adj[v][i];
    if (x == p) continue;
    d[x] = d[v] + 1;
    dfs(v, x);
    sz[v] += sz[x];
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  int i, j, a, b;
  for (i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--;
    b--;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (i = 0; i < m; i++) {
    cin >> a;
    a--;
    mrk[a]++;
  }
  int mx = 0, c = -1, sum = 0;
  dfs(-1, 0);
  c = -1;
  for (i = 0; i < n; i++) {
    if (mrk[i] && (c == -1 || d[i] > d[c])) c = i;
  }
  memset(d, 0, sizeof(d));
  memset(sz, 0, sizeof(sz));
  dfs(-1, c);
  sum = 0, mx = 0;
  for (i = 0; i < n; i++) {
    if (sz[i] > 0 && sz[i] < m) sum++;
    if (mrk[i]) mx = max(mx, d[i]);
  }
  for (i = 0; i < n; i++) {
    if (mrk[i] && d[i] == mx && i < c) {
      c = i;
      break;
    }
  }
  cout << c + 1 << endl << 2 * sum - mx;
  return 0;
}
