#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<int>> e(n + 1);
  vector<vector<int>> re(n + 1);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    e[a].push_back(b);
    re[b].push_back(a);
  }
  int k;
  cin >> k;
  vector<int> p(k);
  for (int i = 0; i < k; i++) cin >> p[i];
  int s = p[0], t = p[k - 1];
  queue<int> q;
  q.push(t);
  vector<bool> visit(n + 1);
  visit[t] = true;
  vector<int> len(n + 1);
  len[t] = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int uu : re[u]) {
      if (visit[uu]) continue;
      visit[uu] = true;
      q.push(uu);
      len[uu] = len[u] + 1;
    }
  }
  int mi = 0, ma = 0;
  for (int i = 0; i < k - 1; i++) {
    int u = p[i], v = p[i + 1];
    if (len[v] + 1 == len[u]) {
      for (int uu : e[u]) {
        if (uu != v && len[v] == len[uu]) {
          ma++;
          break;
        }
      }
    } else {
      mi++, ma++;
    }
  }
  cout << mi << " " << ma << "\n";
  return 0;
}
