#include <bits/stdc++.h>
using namespace std;
mt19937 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
const long double PI = 3.141592653589793;
const long long INF = 9223372036854775807ll;
const long long mod = 1e9 + 7;
const int N = 2e5 + 2;
vector<int> vis(N, 0);
vector<pair<int, int>> adj[N];
vector<pair<int, int>> rev[N];
vector<int> dist(N, 1e8);
int s = 0, e = 0;
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[v].push_back({u, i});
    rev[u].push_back({v, i});
  }
  int k;
  cin >> k;
  vector<int> path(k);
  for (int i = 0; i < k; ++i) {
    cin >> path[i];
  }
  s = path[0] - 1;
  e = path[k - 1] - 1;
  dist[e] = 0;
  auto cmp = [](int a, int b) { return dist[a] > dist[b]; };
  priority_queue<int, vector<int>, decltype(cmp)> pq(cmp);
  pq.push(e);
  while (!pq.empty()) {
    auto tp = pq.top();
    pq.pop();
    for (auto v : adj[tp]) {
      if (dist[v.first] > dist[tp] + 1) {
        dist[v.first] = dist[tp] + 1;
        pq.push(v.first);
      }
    }
  }
  int mn = 0, mx = 0;
  vector<int> ct(N, 0);
  int f = 0;
  for (int i = 0; i < n; ++i) {
    for (auto v : rev[i]) {
      if (dist[v.first] == dist[i] - 1) ct[i]++;
    }
  }
  for (int i = 1; i < k; ++i) {
    int now = path[i] - 1;
    int prev = path[i - 1] - 1;
    if (dist[now] != dist[prev] - 1) {
      f++;
    } else {
      if (ct[prev] > 1) mx++;
    }
  }
  cout << f << " " << (f + mx) << '\n';
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  solve();
  return 0;
}
