#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<int> e[200000], f[200000];
int p[200000];
int d[200000];
bool vis[200000];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) d[i] = 1e9;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    e[u].push_back(v);
    f[v].push_back(u);
  }
  cin >> k;
  for (int i = 0; i < k; ++i) {
    cin >> p[i];
    p[i]--;
  }
  deque<int> q;
  q.push_back(p[k - 1]);
  d[p[k - 1]] = 0;
  while (q.size()) {
    int u = q.front();
    q.pop_front();
    if (vis[u]) continue;
    vis[u] = true;
    for (int v : f[u]) {
      d[v] = min(d[v], d[u] + 1);
      q.push_back(v);
    }
  }
  int res1 = 0, res2 = 0;
  for (int i = 0; i < k - 1; ++i) {
    bool cur1 = false, cur2 = false;
    for (int a : e[p[i]]) {
      if (a != p[i + 1] && d[a] <= d[p[i + 1]]) cur2 = true;
      if (d[a] < d[p[i + 1]]) cur1 = true;
    }
    res1 += cur1;
    res2 += cur2;
  }
  cout << res1 << " " << res2 << "\n";
}
