#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
long long n, m;
vector<long long> adj[N];
vector<long long> adjt[N];
vector<long long> dis(N);
void bfs(long long src) {
  for (long long i = 1; i <= n; i++) {
    dis[i] = INT64_MAX;
  }
  dis[src] = 0;
  queue<long long> q;
  q.push(src);
  while (!q.empty()) {
    auto u = q.front();
    q.pop();
    for (auto x : adjt[u]) {
      if (dis[x] == INT64_MAX) {
        dis[x] = dis[u] + 1;
        q.push(x);
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    long long v, u;
    cin >> v >> u;
    adj[v].push_back(u);
    adjt[u].push_back(v);
  }
  long long k;
  cin >> k;
  vector<long long> path(k);
  for (auto &x : path) cin >> x;
  bfs(*path.rbegin());
  long long a = 0, b = 0;
  for (long long i = 0; i < k - 1; i++) {
    long long v = path[i];
    long long u = path[i + 1];
    if (dis[u] > dis[v] - 1)
      a++;
    else {
      for (auto x : adj[v]) {
        if (x == u) continue;
        if (dis[x] == dis[u]) {
          b++;
          break;
        }
      }
    }
  }
  cout << a << " " << a + b;
  return 0;
}
