#include <bits/stdc++.h>
const int mod = 998244353;
using namespace std;
vector<int> g[300000], gg[300000];
int n, m;
int dis[300000], v[300000];
int p[300000];
void bfs(int s) {
  memset(dis, -1, sizeof(dis));
  memset(v, 0, sizeof(v));
  queue<int> q;
  q.push(s);
  dis[s] = 0;
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    v[t] = 0;
    for (int i = 0; i < g[t].size(); ++i) {
      int x = g[t][i];
      if (dis[x] == -1 || dis[x] > dis[t] + 1) {
        dis[x] = dis[t] + 1;
        if (v[x]) continue;
        q.push(x);
      }
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    g[v].push_back(u);
    gg[u].push_back(v);
  }
  int k;
  cin >> k;
  for (int i = 0; i < k; ++i) {
    cin >> p[i];
  }
  bfs(p[k - 1]);
  int min_ans = 0, max_ans = 0;
  for (int i = 0; i < k - 1; ++i) {
    int d = dis[p[i + 1]];
    if (d != dis[p[i]] - 1) {
      ++min_ans;
      ++max_ans;
    } else {
      int num = 0;
      for (int j = 0; j < gg[p[i]].size(); ++j) {
        int x = gg[p[i]][j];
        if (dis[x] == dis[p[i]] - 1) {
          num++;
        }
      }
      if (num > 1) ++max_ans;
    }
  }
  cout << min_ans << " " << max_ans << endl;
}
