#include <bits/stdc++.h>
using namespace std;
long long tst;
long long n, m, k, a[200005];
vector<long long> adj[200005];
long long dis[200005];
long long vis[200005];
set<long long> cnt[200005];
void cleanData() {}
void solve() {
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    long long u, v;
    cin >> u >> v;
    u--, v--;
    adj[v].push_back(u);
  }
  cin >> k;
  for (int i = 0; i < k; ++i) {
    cin >> a[i];
    a[i]--;
  }
  queue<long long> q;
  q.push(a[k - 1]);
  vis[a[k - 1]] = 1;
  while (!q.empty()) {
    long long x = q.front();
    q.pop();
    for (int i = 0; i < adj[x].size(); ++i) {
      long long next = adj[x][i];
      if (!vis[next]) {
        vis[next] = 1;
        dis[next] = dis[x] + 1;
        q.push(next);
      }
      if (dis[next] == dis[x] + 1) cnt[next].insert(x);
    }
  }
  long long ans1 = 0, ans2 = 0;
  for (int i = 0; i < k - 1; ++i) {
    if (cnt[a[i]].find(a[i + 1]) == cnt[a[i]].end()) ans1++;
    if (cnt[a[i]].size() > 1 || *cnt[a[i]].begin() != a[i + 1]) ans2++;
  }
  cout << ans1 << ' ' << ans2;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  tst = 1;
  while (tst--) {
    cleanData();
    solve();
  }
  return 0;
}
