#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &u) {
  u = 0;
  char c = getchar();
  int flag = 0;
  while (c < '0' || c > '9') flag |= (c == '-'), c = getchar();
  while (c >= '0' && c <= '9')
    u = (u << 3) + (u << 1) + (c ^ 48), c = getchar();
  if (flag) u = -u;
}
template <class T>
void write(T u) {
  if (u < 0) printf("-"), u = -u;
  if (u < 10)
    putchar(48 + u);
  else
    write(u / 10), putchar(48 + u % 10);
}
void write(char u) { putchar(u); }
template <class T, class... Arg>
void read(T &u, Arg &...v) {
  read(u);
  read(v...);
}
template <class T, class... Arg>
void write(T u, Arg... v) {
  write(u);
  write(v...);
}
template <class T>
bool checkmin(T &a, T b) {
  return (b < a ? a = b, 1 : 0);
}
template <class T>
bool checkmax(T &a, T b) {
  return (b > a ? a = b, 1 : 0);
}
template <class T>
T _min(T a, T b) {
  return (a < b ? a : b);
}
template <class T>
T _max(T a, T b) {
  return (a > b ? a : b);
}
const int N = 200005, inf = 1e9;
int n, m, dis[N];
vector<int> G[N], H[N];
int k, p[N];
void bfs(int t) {
  queue<int> q;
  memset(dis, -1, sizeof dis);
  dis[t] = 0;
  q.push(t);
  while (!q.empty()) {
    int now = q.front();
    q.pop();
    for (int i = 0; i < (int)H[now].size(); ++i) {
      int to = H[now][i];
      if (dis[to] == -1) {
        dis[to] = dis[now] + 1;
        q.push(to);
      }
    }
  }
}
void init() {
  read(n, m);
  for (int i = 1, x, y; i <= m; ++i) {
    read(x, y);
    G[x].push_back(y);
    H[y].push_back(x);
  }
  read(k);
  for (int i = 1; i <= k; ++i) {
    read(p[i]);
  }
  bfs(p[k]);
}
void solve() {
  int mn = 0, mx = 0;
  for (int i = 2; i <= k; ++i) {
    int pre = p[i - 1], now = p[i];
    if (dis[pre] < dis[now] + 1) {
      ++mn, ++mx;
    } else {
      int cnt = 0;
      for (int i = 0; i < (int)G[pre].size(); ++i) {
        int to = G[pre][i];
        if (dis[to] == dis[pre] - 1) ++cnt;
      }
      if (cnt > 1) ++mx;
    }
  }
  write(mn, ' ', mx, '\n');
}
int main() {
  int t = 1;
  while (t--) {
    init();
    solve();
  }
  return 0;
}
