#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx2")
using namespace std;
const long long one = 1;
const long long INF = 1e9;
const long long MOD = 998244353;
const long long N = 2e5;
const long long nul = 0;
vector<vector<long long> > gr1, gr2;
vector<long long> dist;
long long n;
void bfs(long long st) {
  queue<long long> q;
  q.push(st);
  dist[st] = 0;
  while (!q.empty()) {
    long long v = q.front();
    q.pop();
    for (long long u : gr2[v]) {
      if (dist[u] == INF) {
        dist[u] = dist[v] + 1;
        q.push(u);
      }
    }
  }
}
signed main() {
  long long m;
  cin >> n >> m;
  gr1.resize(n);
  gr2.resize(n);
  dist.resize(n, INF);
  for (long long i = 0; i < m; i++) {
    long long v, u;
    cin >> v >> u;
    v--;
    u--;
    gr1[v].push_back(u);
    gr2[u].push_back(v);
  }
  long long k;
  cin >> k;
  vector<long long> p(k);
  for (long long &i : p) cin >> i;
  for (long long i = 0; i < k; i++) p[i]--;
  bfs(p[k - 1]);
  long long mincnt = 0, maxcnt = 0;
  for (long long i = 0; i < k - 1; i++) {
    bool f1 = 0, f2 = 0;
    for (long long u : gr1[p[i]]) {
      if (u == p[i + 1]) continue;
      if (dist[u] < dist[p[i + 1]])
        f2 = 1;
      else if (dist[u] == dist[p[i + 1]])
        f1 = 1;
    }
    if (f2) {
      mincnt++;
      maxcnt++;
    } else if (f1) {
      maxcnt++;
    }
  }
  cout << mincnt << " " << maxcnt << endl;
}
