#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<int> gr[(ll)(123459)];
bool ch[(ll)(123459)];
pair<int, int> ml;
int cc = 0;
pair<int, int> gt(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first > p2.first) {
    return p1;
  }
  if (p2.first > p1.first) {
    return p2;
  }
  if (p1.second < p2.second) {
    return p1;
  }
  return p2;
}
bool gtb(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first > p2.first) {
    return 1;
  }
  if (p2.first > p1.first) {
    return 0;
  }
  if (p1.second < p2.second) {
    return 1;
  }
  return 0;
}
pair<int, int> dfs(int node, int par) {
  pair<int, int> m1, m2;
  for (int x : gr[node]) {
    if (x != par) {
      pair<int, int> xx = dfs(x, node);
      if (!xx.first) {
        continue;
      }
      cc++;
      if (gtb(xx, m1)) {
        m2 = m1;
        m1 = xx;
      } else if (gtb(xx, m2)) {
        m2 = xx;
      }
    }
  }
  if (!m1.first && !m2.first && !ch[node]) {
    return make_pair(0, 0);
  }
  if (!m1.first && !m2.first && ch[node]) {
    ml = gt(ml, make_pair(1, node));
    return make_pair(1, node);
  }
  if (m2.first && m1.first) {
    ml = gt(ml, make_pair(m1.first + m2.first + 1, min(m1.second, m2.second)));
    if (m1.first > m2.first) {
      return make_pair(m1.first + 1, m1.second);
    }
    if (m2.first == m2.first) {
      return make_pair(m1.first + 1, min(m1.second, m2.second));
    }
    return make_pair(m2.first + 1, m2.second);
  }
  if (m2.first) {
    ml = gt(ml, make_pair(m2.first + 1, min(node, m2.second)));
    return make_pair(m2.first + 1, m2.second);
  }
  ml = gt(ml, make_pair(m1.first + 1, min(m1.second, node)));
  return make_pair(m1.first + 1, m1.second);
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  int a;
  for (int i = 0; i < m; i++) {
    cin >> a;
    ch[a] = 1;
  }
  dfs(a, 0);
  cout << ml.second << "\n";
  cout << cc * 2 - ml.first + 1 << "\n";
}
