#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 2e5 + 2;
vector<int> g[N], g2[N];
int lvl[N], k, p[N];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    g[--x].push_back(--y);
    g2[y].push_back(x);
  }
  cin >> k;
  for (int i = 0; i < k; i++) cin >> p[i], p[i]--;
  memset(lvl, -1, sizeof lvl);
  queue<int> q;
  lvl[p[k - 1]] = 0;
  q.push(p[k - 1]);
  while (q.size()) {
    int node = q.front();
    q.pop();
    for (auto to : g2[node]) {
      if (lvl[to] == -1) {
        lvl[to] = lvl[node] + 1;
        q.push(to);
      }
    }
  }
  int mn = 0, mx = 0;
  for (int i = 0; i < k - 1; i++) {
    int cnt = 0;
    for (auto to : g[p[i]]) {
      if (lvl[p[i]] == lvl[to] + 1) cnt++;
    }
    if (lvl[p[i]] <= lvl[p[i + 1]])
      mn++, mx++;
    else if (cnt > 1)
      mx++;
  }
  cout << mn << ' ' << mx;
  return 0;
}
