#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<int>> G(n + 1);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    G[v].push_back(u);
  }
  int k;
  cin >> k;
  vector<int> path(k);
  for (int i = 0; i < k; i++) cin >> path[i];
  const int INF = 1e9;
  vector<int> dis(n + 1, INF);
  vector<vector<int>> anc(n + 1);
  dis[path.back()] = 0;
  queue<int> Q;
  Q.push(path.back());
  while (not Q.empty()) {
    int u = Q.front();
    Q.pop();
    for (int v : G[u]) {
      if (dis[v] == dis[u] + 1) {
        if (int(anc[v].size()) == 1) anc[v].push_back(u);
      }
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        anc[v].clear();
        anc[v].push_back(u);
        Q.push(v);
      }
    }
  }
  int mn = 0;
  int mx = 0;
  for (int i = 0; i + 1 < k; i++) {
    int u = path[i];
    int v = path[i + 1];
    int len = dis[u];
    if (dis[v] == len - 1) {
      mn += 0;
    } else {
      mn += 1;
    }
    if (dis[v] == len - 1 and int(anc[u].size()) == 1 and anc[u][0] == v) {
      mx += 0;
    } else {
      mx += 1;
    }
  }
  cout << mn << ' ' << mx << '\n';
  return (0);
}
