#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int head[N], ver[N], Next[N], tot;
int hc[N], vc[N], nc[N], tc;
int d[N], p[N], n, m, k, s, t;
bool v[N];
int c_min, c_max;
inline int qr() {
  int f = 0, fu = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') fu = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    f = (f << 3) + (f << 1) + c - 48;
    c = getchar();
  }
  return f * fu;
}
inline void add(int x, int y) {
  ver[++tot] = y;
  Next[tot] = head[x];
  head[x] = tot;
}
inline void add_c(int x, int y) {
  vc[++tc] = y;
  nc[tc] = hc[x];
  hc[x] = tc;
}
inline void read() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    x = qr(), y = qr();
    add(x, y), add_c(y, x);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) p[i] = qr();
  s = p[1], t = p[k];
}
inline void spfa() {
  deque<int> q;
  memset(d, 0x3f, sizeof(d));
  q.push_back(t), v[t] = true, d[t] = 0;
  while (!q.empty()) {
    int x = q.front();
    q.pop_front(), v[x] = false;
    for (int i = hc[x]; i; i = nc[i]) {
      int y = vc[i];
      if (d[y] > d[x] + 1) {
        d[y] = d[x] + 1;
        if (!v[y]) {
          v[y] = true;
          (q.empty() || d[y] > d[q.front()]) ? q.push_back(y) : q.push_front(y);
        }
      }
    }
  }
}
inline void solve() {
  int x = s, num = 1;
  while (x != t) {
    bool flag = false;
    int cnt = 0;
    for (int i = head[x]; i; i = Next[i]) {
      int y = ver[i];
      if (d[y] + 1 == d[x]) {
        cnt++;
        if (y == p[num + 1]) flag = true;
      }
    }
    if (cnt > 1) {
      c_max++;
      if (!flag) c_min++;
    } else if (!flag)
      c_min++, c_max++;
    x = p[++num];
  }
  printf("%d %d\n", c_min, c_max);
}
int main() {
  read();
  spfa();
  solve();
  return 0;
}
