#include <bits/stdc++.h>
using namespace std;
int N, M;
vector<int> E[202020];
vector<int> RE[202020];
vector<int> ne[202020];
int D[202020], mi[202020];
int K;
vector<int> P;
int cand[202020];
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> N >> M;
  for (i = 0; i < (M); i++) {
    cin >> x >> y;
    E[x - 1].push_back(y - 1);
    RE[y - 1].push_back(x - 1);
  }
  for (i = 0; i < (N); i++) D[i] = 202020;
  cin >> K;
  for (i = 0; i < (K); i++) cin >> x, P.push_back(x - 1);
  D[P.back()] = 0;
  queue<int> Q;
  Q.push(P.back());
  while (Q.size()) {
    int cur = Q.front();
    Q.pop();
    for (auto& e : RE[cur])
      if (D[e] > D[cur] + 1) {
        D[e] = D[cur] + 1;
        Q.push(e);
      }
  }
  for (i = 0; i < (N); i++) {
    mi[i] = 202020;
    for (auto& e : E[i]) mi[i] = min(mi[i], D[e]);
    for (auto& e : E[i]) cand[i] += D[e] == mi[i];
  }
  int L = 0, R = 0;
  for (i = 0; i < (P.size() - 1); i++) {
    if (D[P[i + 1]] == mi[P[i]]) {
      if (cand[P[i]] > 1) R++;
    } else {
      L++;
      R++;
    }
  }
  cout << L << " " << R << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  cout.tie(0);
  solve();
  return 0;
}
