#include <bits/stdc++.h>
using namespace std;
struct edge {
  int t, next, v;
} g[810001];
int i, j, k, n, m, h[410001], a[410001], dis[410001], tot, w, a0, a1, q[410001];
void addedge(int x, int y) {
  g[++tot].t = y;
  g[tot].next = h[x];
  h[x] = tot;
  g[tot].v = 0;
  g[++tot].t = x;
  g[tot].next = h[y];
  h[y] = tot;
  g[tot].v = 1;
}
void bfs(int s) {
  int i, j, l, r;
  for (i = 1; i <= n; i++) dis[i] = -1;
  dis[s] = 0;
  q[1] = s;
  l = 0;
  r = 1;
  while (l < r) {
    j = q[++l];
    for (i = h[j]; i; i = g[i].next)
      if (g[i].v && dis[g[i].t] == -1) {
        dis[g[i].t] = dis[j] + 1;
        q[++r] = g[i].t;
      }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  tot = 0;
  memset(h, 0, sizeof(h));
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &j, &k);
    addedge(j, k);
  }
  scanf("%d", &w);
  for (i = 1; i <= w; i++) scanf("%d", &a[i]);
  bfs(a[w]);
  for (a0 = a1 = 0, i = 1; i < w; i++) {
    if (dis[a[i + 1]] + 1 != dis[a[i]]) a0++;
    for (k = 0, j = h[a[i]]; !k && j; j = g[j].next)
      if (!g[j].v && g[j].t != a[i + 1] && dis[g[j].t] + 1 == dis[a[i]]) k = 1;
    a1 += k;
  }
  printf("%d %d\n", a0, a1);
  return 0;
}
