#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int N = 2e5 + 10;
struct Edge {
  int to, next;
} e[N], edge[N];
int head[N], h[N];
int cnt, tmp;
int p[N];
int dis[N];
bool inq[N];
int n, m, k;
int minn, maxn;
void add(int u, int v) {
  cnt++;
  e[cnt].to = v;
  e[cnt].next = head[u];
  head[u] = cnt;
}
void spfa(int s) {
  queue<int> q;
  for (int i = 1; i <= n; i++) dis[i] = inf, inq[i] = 0;
  dis[s] = 0;
  q.push(s);
  inq[s] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    inq[u] = 0;
    for (int i = head[u]; i; i = e[i].next) {
      int v = e[i].to;
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        if (!inq[v]) {
          inq[v] = 1;
          q.push(v);
        }
      }
    }
  }
}
void dfs(int now, int tmp) {
  if (now + 1 == k) return;
  if (dis[p[now + 1]] > tmp - 1) minn++, maxn++;
  for (int i = h[p[now]]; i; i = edge[i].next) {
    int v = edge[i].to;
    if (v == p[now + 1]) continue;
    if (dis[v] == dis[p[now + 1]] && dis[v] == tmp - 1) {
      maxn++;
      break;
    }
  }
  dfs(now + 1, dis[p[now + 1]]);
}
void add_edge(int u, int v) {
  tmp++;
  edge[tmp].to = v;
  edge[tmp].next = h[u];
  h[u] = tmp;
}
void solve() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    add(v, u);
    add_edge(u, v);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) scanf("%d", &p[i]);
  spfa(p[k]);
  dfs(1, dis[p[1]]);
  printf("%d %d\n", minn, maxn);
}
int main() {
  solve();
  return 0;
}
