#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &V);
template <typename T>
ostream &operator<<(ostream &out, const set<T> &S);
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &P);
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const map<T1, T2> &M);
void bfs(int s, vector<int> &D, vector<int> &P, bool with_desired,
         vector<int> &Desired, vector<vector<int> > &Neigh) {
  for (int i = 0; i < D.size(); i++) {
    D[i] = P[i] = -1;
  }
  queue<int> Q;
  Q.push(s);
  D[s] = 0;
  P[s] = -1;
  while (!Q.empty()) {
    int r = Q.front();
    Q.pop();
    for (int v : Neigh[r]) {
      if (D[v] == -1) {
        D[v] = D[r] + 1;
        P[v] = r;
        Q.push(v);
      } else if (D[v] == D[r] + 1) {
        if (with_desired && Desired[r] == v) {
          P[v] = r;
        } else if (!with_desired && Desired[r] != v) {
          P[v] = r;
        }
      }
    }
  }
}
void testcase() {
  int n, m;
  cin >> n >> m;
  vector<vector<int> > Neigh(n + 1);
  vector<vector<int> > Prev(n + 1);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    Neigh[u].push_back(v);
    Prev[v].push_back(u);
  }
  int k;
  cin >> k;
  vector<int> Path(k), Desired(n + 1, -1);
  for (int i = 0; i < k; i++) {
    cin >> Path[i];
    if (i > 0) {
      Desired[Path[i]] = Path[i - 1];
    }
  }
  vector<int> D0(n + 1), P0(n + 1), D1(n + 1), P1(n + 1);
  bfs(Path[k - 1], D0, P0, true, Desired, Prev);
  bfs(Path[k - 1], D1, P1, false, Desired, Prev);
  int min_reb = 0, max_reb = 0;
  for (int i = k - 2; i >= 0; i--) {
    min_reb += (P0[Path[i]] == Path[i + 1]) ? 0 : 1;
    max_reb += (P1[Path[i]] == Path[i + 1]) ? 0 : 1;
  }
  cout << min_reb << " " << max_reb << endl;
}
void init() {}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  init();
  int T = 1;
  for (int t = 0; t < T; t++) {
    testcase();
  }
  return 0;
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &V) {
  if (!V.empty()) {
    out << "{";
    for (auto v : V) out << v << ", ";
    out << "\b\b}";
  } else {
    out << "{}";
  }
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, const set<T> &S) {
  if (!S.empty()) {
    out << "set{";
    for (auto v : S) out << v << ", ";
    out << "\b\b}";
  } else {
    out << "{}";
  }
  return out;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const map<T1, T2> &M) {
  if (!M.empty()) {
    out << "map{";
    for (auto &kv : M)
      out << "(" << kv.first << ": " << kv.second << ")"
          << ", ";
    out << "\b\b}";
  } else {
    out << "{}";
  }
  return out;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &P) {
  out << "{" << P.first << ", " << P.second << "}";
  return out;
}
