#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10, Mod = 1e9 + 7;
int n, m, k;
vector<vector<int>> adjr, adjb;
vector<bool> vis;
vector<int> p, dis, par;
void bfs(int x) {
  queue<int> q;
  vis[x] = 1;
  dis[x] = 0;
  q.push(x);
  par[x] = -1;
  while (q.size()) {
    int u = q.front();
    q.pop();
    for (int v : adjb[u]) {
      if (!vis[v]) {
        vis[v] = 1;
        dis[v] = dis[u] + 1;
        par[v] = u;
        q.push(v);
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  adjr.resize(n + 10);
  adjb.resize(n + 10);
  vis.assign(n + 10, 0);
  dis.resize(n + 10);
  par.resize(n + 10);
  for (int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    adjr[a].push_back(b);
    adjb[b].push_back(a);
  }
  cin >> k;
  p.resize(k + 10);
  for (int i = 1; i <= k; i++) cin >> p[i];
  bfs(p[k]);
  int mians = 0, maans = 0;
  for (int i = 1; i <= k - 1; i++) {
    if (dis[p[i + 1]] > dis[p[i]] - 1) {
      mians++;
      maans++;
    } else {
      bool fl = 0;
      for (int v : adjr[p[i]]) {
        if (v != p[i + 1] && dis[v] == dis[p[i]] - 1) {
          fl = 1;
          break;
        }
      }
      if (fl) maans++;
    }
  }
  cout << mians << ' ' << maans;
}
