#include <bits/stdc++.h>
using namespace std;
void faster() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
const long long INF = 1e9;
const long long MAXN = 3e5 + 100;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
long long n, m, k, d[MAXN], path[MAXN], cnt, ans, cost[MAXN], ans1;
vector<long long> g[MAXN], gr[MAXN];
void bfs(int s, long long dist[]) {
  queue<int> q;
  q.push(s);
  for (int i = 0; i < n; ++i) dist[i] = INF;
  dist[s] = 0;
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int to : g[v]) {
      if (dist[to] == INF) {
        dist[to] = dist[v] + 1;
        q.push(to);
      }
    }
  }
}
void solve() {
  cin >> n >> m;
  for (int i = 0, u, v; i < m; ++i) {
    cin >> u >> v;
    u--;
    v--;
    g[v].push_back(u);
    gr[u].push_back(v);
  }
  cin >> k;
  for (int i = 0; i < k; ++i) {
    cin >> path[i];
    path[i]--;
  }
  bfs(path[k - 1], d);
  for (long long i = 0, v; i + 1 < k; ++i) {
    v = path[i];
    cnt = 0;
    for (int to : gr[v])
      if (d[to] + 1 == d[v]) cnt++;
    if (d[v] - 1 < d[path[i + 1]] || cnt > 1) {
      ans++;
    }
    if (d[v] - 1 < d[path[i + 1]]) {
      ans1++;
    }
  }
  cout << ans1 << ' ' << ans;
}
int main() {
  faster();
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
