#include <bits/stdc++.h>
using namespace std;
const int mx = 200005;
vector<int> adj[mx], rev[mx];
int dis2[mx], a[mx];
void bfs2(int u) {
  queue<int> qu;
  qu.push(u);
  dis2[u] = 0;
  while (!qu.empty()) {
    u = qu.front();
    qu.pop();
    for (auto v : rev[u]) {
      if (dis2[v] > dis2[u] + 1) {
        dis2[v] = dis2[u] + 1;
        qu.push(v);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    rev[v].push_back(u);
  }
  int l;
  cin >> l;
  for (int i = 1; i <= l; i++) {
    cin >> a[i];
  }
  for (int i = 0; i <= n; i++) dis2[i] = 1e8;
  bfs2(a[l]);
  int p = 0, q = 0;
  for (int i = 1; i < l; i++) {
    int d = dis2[a[i]];
    if (dis2[a[i + 1]] + 1 > d) {
      p++, q++;
      continue;
    }
    int c = 0;
    for (auto u : adj[a[i]]) {
      if (dis2[u] + 1 == d) c++;
    }
    if (c > 1) {
      q++;
    }
  }
  cout << p << " " << q << "\n";
  return 0;
}
