#include <bits/stdc++.h>
using namespace std;
long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1ll;
  long long _tmp = mypow(_a, _x / 2, _mod);
  _tmp = (_tmp * _tmp) % _mod;
  if (_x & 1) _tmp = (_tmp * _a) % _mod;
  return _tmp;
}
bool equal(double _x, double _y) { return _x > _y - 1e-9 && _x < _y + 1e-9; }
int __ = 1, cs;
vector<int> v[654321];
int n, m, dp[654321][3], cnt[654321];
int from[654321][3];
int sz[654321];
void add(int tno, int tfrom, int tcst) {
  for (int i = 0; i < 2; i++) {
    if (sz[tno] == i) {
      ++sz[tno];
      dp[tno][i + 1] = tcst;
      from[tno][i + 1] = tfrom;
      return;
    }
    if (tcst < dp[tno][i + 1]) {
      swap(dp[tno][i + 1], tcst);
      swap(from[tno][i + 1], tfrom);
    }
  }
}
int tk(int tno, int fb) {
  for (int i = 1; i <= sz[tno]; i++)
    if (fb != from[tno][i]) return dp[tno][i];
  return -1;
}
bool mk[654321];
void build() {}
void init() {
  n = getint();
  m = getint();
  for (int i = 1; i < n; i++) {
    int tu = getint();
    int tv = getint();
    v[tu].push_back(tv);
    v[tv].push_back(tu);
  }
  while (m--) mk[getint()] = true;
}
void pDP(int now, int prt) {
  if (mk[now]) cnt[now]++;
  for (size_t i = 0; i < v[now].size(); i++)
    if (v[now][i] != prt) {
      pDP(v[now][i], now);
      cnt[now] += cnt[v[now][i]];
    }
}
void DP1(int now, int prt) {
  for (size_t i = 0; i < v[now].size(); i++)
    if (v[now][i] != prt) {
      if (cnt[v[now][i]] == 0) continue;
      DP1(v[now][i], now);
      dp[now][0] += 2 + dp[v[now][i]][0];
    }
  for (size_t i = 0; i < v[now].size(); i++)
    if (v[now][i] != prt) {
      if (cnt[v[now][i]] == 0) continue;
      int tmp = dp[now][0] - 2 - dp[v[now][i]][0];
      tmp += 1 + dp[v[now][i]][1];
      add(now, v[now][i], tmp);
    }
}
int ans, mcst;
void DP2(int now, int prt, int bns0, int bns1) {
  int tans = min(bns0 + dp[now][1], bns1 + dp[now][0]);
  if (tans < mcst || (tans == mcst && now < ans)) ans = now, mcst = tans;
  for (size_t i = 0; i < v[now].size(); i++)
    if (v[now][i] != prt) {
      if (cnt[v[now][i]] == 0) continue;
      int nbns0 = bns0 + dp[now][0] - dp[v[now][i]][0];
      int nbns1 = bns1 + dp[now][0] - dp[v[now][i]][0] - 1;
      int tmp = tk(now, v[now][i]);
      if (tmp != -1) {
        int nbns2 = bns0 + tmp - dp[v[now][i]][0] - 1;
        nbns1 = min(nbns1, nbns2);
      }
      if (cnt[1] == cnt[v[now][i]]) nbns0 = nbns1 = 0;
      DP2(v[now][i], now, nbns0, nbns1);
    }
}
void solve() {
  pDP(1, 1);
  DP1(1, 1);
  ans = 1;
  mcst = dp[1][0];
  DP2(1, 1, 0, 0);
  printf("%d\n%d\n", ans, mcst);
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}
