#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long long int INF = (long long int)1e15;
struct Vertex {
  vector<long long int> node;
};
Vertex V[200005];
Vertex RV[200005];
long long int C[200005];
long long int P[200005];
int main() {
  long long int N, M;
  cin >> N >> M;
  for (long long int(i) = (0); (i) < (M); ++(i)) {
    long long int a, b;
    cin >> a >> b;
    a--;
    b--;
    V[a].node.push_back(b);
    RV[b].node.push_back(a);
  }
  long long int K;
  cin >> K;
  for (long long int(i) = (0); (i) < (K); ++(i)) {
    cin >> P[i];
    P[i]--;
  }
  for (long long int(i) = (0); (i) < (N); ++(i)) {
    C[i] = INF;
  }
  C[P[K - 1]] = 0;
  {
    queue<pair<long long int, long long int> > q;
    q.push(pair<long long int, long long int>(P[K - 1], 0));
    while (!q.empty()) {
      pair<long long int, long long int> t = q.front();
      q.pop();
      long long int cost = t.second + 1;
      for (long long int(i) = (0); (i) < (RV[t.first].node.size()); ++(i)) {
        long long int n = RV[t.first].node[i];
        if (C[n] <= cost) continue;
        C[n] = cost;
        q.push(pair<long long int, long long int>(n, cost));
      }
    }
  }
  long long int min = 0, max = 0;
  {
    for (long long int(i) = (0); (i) < (K - 1); ++(i)) {
      long long int p = P[i];
      long long int n = P[i + 1];
      long long int pc = C[p];
      long long int nc = C[n];
      if (pc - 1 == nc) {
        long long int m = 0;
        for (long long int(j) = (0); (j) < (V[p].node.size()); ++(j)) {
          long long int a = V[p].node[j];
          if (C[a] == nc) m++;
        }
        if (m > 1) max++;
      } else {
        min++;
      }
    }
  }
  cout << min << " " << max + min << endl;
  return 0;
}
