#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, M = 1e7 + 5, K = 25;
vector<int> g[N], g2[N];
bool done[N], lol[N];
int n, m, root;
pair<int, int> ans[N];
long long mn = 1234567899999;
int Ans;
int dfS(int node = 1, int parent = 1) {
  int ret = 0;
  for (auto child : g[node]) {
    if (child != parent) {
      int cur = dfS(child, node);
      if (root) return 0;
      ret += cur;
      if (cur) g2[node].push_back(child), g2[child].push_back(node);
    }
  }
  if (ret + lol[node] == m && !root) root = node;
  return ret + lol[node];
}
int diameterLength, a;
pair<int, int> getDiameter(int node, int parent) {
  if (g2[node].size() == 1 && node != root) return {1, -node};
  vector<pair<int, int> > tmp;
  for (auto child : g2[node])
    if (child != parent) tmp.push_back(getDiameter(child, node));
  sort(tmp.rbegin(), tmp.rend());
  if (tmp.size() > 1) {
    if (tmp[0].first + tmp[1].first > diameterLength) {
      diameterLength = tmp[0].first + tmp[1].first;
      a = max(tmp[1].second, tmp[0].second);
    } else if (tmp[0].first + tmp[1].first == diameterLength) {
      a = max(a, max(tmp[1].second, tmp[0].second));
    }
  }
  if (tmp[0].first > diameterLength) {
    diameterLength = tmp[0].first;
    a = max(-node, tmp[0].second);
  } else if (tmp[0].first == diameterLength)
    a = max(a, max(-node, tmp[0].second));
  tmp[0].first++;
  return tmp[0];
}
int dist = 0;
void dfs(int node, int parent) {
  for (auto child : g2[node])
    if (child != parent) dfs(child, node), dist++;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  int x;
  for (int i = 1; i <= m; i++) {
    cin >> x;
    lol[x] = 1;
  }
  if (m == 1) return cout << x << ' ' << 0, 0;
  dfS();
  getDiameter(root, root);
  a *= -1;
  dfs(a, a);
  dist = dist * 2 - diameterLength;
  cout << a << "\n" << dist;
  return 0;
}
