#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
vector<int> vec[N], vecc[N];
int n, m;
int a[N], q;
int num[N], dis[N], vis[N];
struct node {
  int x, fa, step;
};
void bfs() {
  queue<node> Q;
  Q.push((node){a[q - 1], -1, 0});
  vis[a[q - 1]] = 1;
  dis[a[q - 1]] = 0;
  while (!Q.empty()) {
    node p = Q.front();
    Q.pop();
    for (int i : vec[p.x]) {
      if (vis[i] == 1) {
        if (p.step + 1 == dis[i]) num[i]++;
        continue;
      }
      vis[i] = 1;
      dis[i] = p.step + 1;
      Q.push((node){i, p.x, p.step + 1});
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    vec[y].push_back(x);
    vecc[x].push_back(y);
  }
  scanf("%d", &q);
  for (int i = 0; i < q; i++) scanf("%d", &a[i]);
  memset(dis, 0x3f3f3f3f, sizeof(dis));
  bfs();
  int x = 0, y = 0;
  for (int i = 0; i < q - 1; i++) {
    int flg = 0;
    if (dis[a[i]] != dis[a[i + 1]] + 1) x++, flg = 1;
    if (dis[a[i]] == dis[a[i + 1]] + 1 && num[a[i]] > 0) y++, flg = 1;
  }
  printf("%d %d\n", x, x + y);
}
