#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 10;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
long long poww(long long a, long long b) {
  if (b == 0) return 1;
  long long x = poww(a, b / 2) % mod;
  if (b & 1)
    return (((x * x) % mod) * a) % mod;
  else
    return (x * x) % mod;
}
long long n, m, k, dis[maxn], mark[maxn], p[maxn], ans1 = 0, ans2 = 0;
vector<long long> g[maxn], g2[maxn];
void bfs(long long v) {
  queue<long long> qu;
  for (int i = 1; i <= n; i++) {
    mark[i] = 0;
    dis[i] = INF;
  }
  mark[v] = 1;
  dis[v] = 0;
  qu.push(v);
  while (qu.size()) {
    long long u = qu.front();
    qu.pop();
    for (auto uu : g2[u]) {
      if (!mark[uu]) {
        mark[uu] = 1;
        dis[uu] = dis[u] + 1;
        qu.push(uu);
      }
    }
  }
}
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    long long v, u;
    cin >> v >> u;
    g[v].push_back(u);
    g2[u].push_back(v);
  }
  cin >> k;
  for (int i = 1; i <= k; i++) cin >> p[i];
  long long t = p[k];
  bfs(t);
  for (int i = 1; i < k; i++) {
    long long minn = INF, te = 0;
    for (auto u : g[p[i]]) {
      if (dis[u] < minn) {
        minn = dis[u];
        te = 1;
      } else if (dis[u] == minn)
        te++;
    }
    long long to = p[i + 1];
    if (dis[to] > minn) {
      ans1++;
      ans2++;
    } else {
      if (te > 1) ans2++;
    }
  }
  cout << ans1 << " " << ans2;
  return 0;
}
