#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5;
vector<int> ms[maxn];
bitset<maxn> bio;
bitset<maxn> ne;
vector<int> put;
bool je[maxn];
int x, y;
int bfs(int x) {
  queue<int> q;
  q.push(x);
  bio[x] = 1;
  while (!q.empty()) {
    x = q.front();
    q.pop();
    for (int i = 0; i < ms[x].size(); i++) {
      if (!bio[ms[x][i]]) {
        bio[ms[x][i]] = 1;
        q.push(ms[x][i]);
      }
    }
  }
  return x;
}
bool dfs(int x, int prij) {
  if (y == x) {
    put.push_back(x);
    return 1;
  }
  for (int i = 0; i < ms[x].size(); i++) {
    if (ms[x][i] != prij) {
      if (dfs(ms[x][i], x)) {
        put.push_back(x);
        return 1;
      }
    }
  }
  return 0;
}
int br[maxn];
int gore[maxn];
int ok;
int mini;
int dfs1(int x, int pros) {
  gore[x] = pros;
  if (je[x]) {
    br[x]++;
  }
  for (int i = 0; i < ms[x].size(); i++) {
    if (ms[x][i] != pros) {
      br[x] += dfs1(ms[x][i], x);
    }
  }
  return br[x];
}
void dfs2(int x, int pros, int dis) {
  if (dis == ok) {
    mini = min(mini, x);
    return;
  }
  for (int i = 0; i < ms[x].size(); i++) {
    if (ms[x][i] != pros && !ne[ms[x][i]]) {
      dfs2(ms[x][i], x, dis + 1);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  int a, b;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--;
    b--;
    ms[a].push_back(b);
    ms[b].push_back(a);
  }
  for (int i = 0; i < m; i++) {
    cin >> a;
    a--;
    je[a] = 1;
  }
  dfs1(0, -1);
  for (int i = 0; i < n; i++) {
    a = 0;
    for (int j = 0; j < ms[i].size(); j++) {
      if (ms[i][j] != gore[i]) {
        if (br[ms[i][j]]) {
          a++;
        }
      } else {
        if (br[0] - br[i]) {
          a++;
        }
      }
    }
    if (a < 2 && !je[i]) {
      ne[i] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    if (!ne[i]) {
      x = i;
      break;
    }
  }
  bio |= ne;
  x = bfs(x);
  bio.reset();
  bio |= ne;
  y = bfs(x);
  dfs(x, -1);
  mini = 1e9;
  ok = put.size() / 2;
  dfs2(put[put.size() / 2], -1, 0);
  if (put.size() % 2 == 0) {
    dfs2(put[put.size() / 2 - 1], -1, 0);
  }
  cout << mini + 1 << '\n';
  n -= ne.count();
  cout << n * 2 - put.size() - 1 << '\n';
  return 0;
}
