#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5 + 10;
int tot, head[maxn], cnt[maxn], dis[maxn], path[maxn];
struct edge {
  int to, nxt;
} e[maxn << 1];
template <typename T = int>
inline const T read() {
  T x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
template <typename T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
void addEdge(int u, int v) {
  e[tot].to = v;
  e[tot].nxt = head[u];
  head[u] = tot++;
}
void bfs(int src) {
  dis[src] = cnt[src] = 1;
  queue<int> q;
  q.push(src);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = head[u]; ~i; i = e[i].nxt) {
      int v = e[i].to;
      if (!dis[v]) {
        dis[v] = dis[u] + 1;
        q.push(v);
      }
      if (dis[v] == dis[u] + 1) cnt[v]++;
    }
  }
}
int main() {
  int n = read(), m = read();
  memset(head, -1, sizeof(head));
  while (m--) {
    int u = read(), v = read();
    addEdge(v, u);
  }
  int k = read();
  for (int i = 1; i <= k; i++) path[i] = read();
  bfs(path[k]);
  int mn = 0, mx = 0;
  for (int i = 2; i <= k; i++) {
    if (dis[path[i]] != dis[path[i - 1]] - 1) {
      mn++;
      mx++;
    } else if (cnt[path[i - 1]] >= 2)
      mx++;
  }
  cout << mn << " " << mx << endl;
  return 0;
}
