#include <bits/stdc++.h>
using namespace std;
vector<int> adjList[200000], adjList2[200000];
int p[200000];
int dist[200000];
queue<int> Q;
set<pair<int, int> > can, must;
int main() {
  int i;
  int n, m, k, u, v;
  scanf("%d %d", &n, &m);
  for (i = 0; i < m; i++) {
    scanf("%d %d", &u, &v);
    u--, v--;
    adjList[v].push_back(u);
    adjList2[u].push_back(v);
  }
  scanf("%d", &k);
  for (i = 0; i < k; i++) scanf("%d", &p[i]), p[i]--;
  int j;
  fill(dist, dist + n, -1);
  dist[p[k - 1]] = 0, Q.push(p[k - 1]);
  while (!Q.empty()) {
    u = Q.front();
    Q.pop();
    for (i = 0; i < adjList[u].size(); i++) {
      v = adjList[u][i];
      if (dist[v] == -1) {
        dist[v] = dist[u] + 1;
        Q.push(v);
      }
    }
  }
  for (i = 0; i < n; i++) {
    int c = 0;
    for (j = 0; j < adjList2[i].size(); j++) {
      v = adjList2[i][j];
      if (dist[i] == dist[v] + 1) can.insert(make_pair(i, v)), c++;
    }
    if (c == 1) {
      for (j = 0; j < adjList2[i].size(); j++) {
        v = adjList2[i][j];
        if (dist[i] == dist[v] + 1) must.insert(make_pair(i, v));
      }
    }
  }
  int s = 0, b = 0;
  for (i = 1; i < k; i++) {
    if (!can.count(make_pair(p[i - 1], p[i]))) s++;
    if (!must.count(make_pair(p[i - 1], p[i]))) b++;
  }
  printf("%d %d\n", s, b);
  return 0;
}
