#include <bits/stdc++.h>
using namespace std;
namespace kotespace {
template <class T>
class duplet {
 private:
 public:
  T x, y;
  duplet(){};
  duplet(T a, T b) : x(a), y(b){};
  bool operator<(const duplet P) const {
    return (x < P.x || (x == P.x && y < P.y));
  }
  bool operator>(const duplet P) const {
    return (x > P.x || (x == P.x && y > P.y));
  }
  bool operator==(const duplet P) const { return (x == P.x && y == P.y); }
  bool operator!=(const duplet P) const { return (x != P.x || y != P.y); }
  void reverse() { std::swap(x, y); }
};
template <class P>
istream &operator>>(istream &in, duplet<P> &T) {
  return (in >> T.x >> T.y);
}
template <class P>
ostream &operator<<(ostream &out, duplet<P> T) {
  return (out << T.x << " " << T.y);
}
template <class T>
class triplet {
 private:
 public:
  T x, y, z;
  triplet(){};
  triplet(T a, T b, T c) : x(a), y(b), z(c){};
  bool operator<(const triplet P) const {
    return (x < P.x || (x == P.x && y < P.y) ||
            (x == P.x && y == P.y && z < P.z));
  }
  bool operator>(const triplet P) const {
    return (x > P.x || (x == P.x && y > P.y) ||
            (x == P.x && y == P.y && z > P.z));
  }
  bool operator==(const triplet P) const {
    return (x == P.x && y == P.y && z == P.z);
  }
  bool operator!=(const triplet P) const {
    return (x != P.x || y != P.y || z != P.z);
  }
  void reverse() { std::swap(x, z); }
  void cycle_right(int a) {
    if (a == 1) {
      std::swap(x, y);
      std::swap(x, z);
    }
    if (a == 2) {
      std::swap(x, z);
      std::swap(y, x);
    }
  }
  void cycle_left(int a) {
    if (a == 1) {
      std::swap(x, z);
      std::swap(y, x);
    }
    if (a == 2) {
      std::swap(x, y);
      std::swap(x, z);
    }
  }
};
template <class P>
istream &operator>>(istream &in, triplet<P> &T) {
  return (in >> T.x >> T.y >> T.z);
}
template <class P>
ostream &operator<<(ostream &out, triplet<P> &T) {
  return (out << T.x << " " << T.y << " " << T.z);
}
}  // namespace kotespace
using namespace kotespace;
long long inf = 1000 * 1000 * 1000 + 7;
long long inf64 = inf * inf;
long long mod = 228228227;
float START_TIME;
namespace std {
template <>
struct hash<duplet<int>> {
  size_t operator()(const duplet<int> &k) const {
    return (size_t)(k.x) * 102931204 + (size_t)(k.y) * 434823123;
  }
};
}  // namespace std
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cerr << fixed << setprecision(10);
  cout << fixed << setprecision(10);
  srand(time(0));
  START_TIME = clock();
  int n, m;
  cin >> n >> m;
  vector<vector<int>> g(n);
  vector<vector<int>> g1(n);
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    g[y - 1].push_back(x - 1);
    g1[x - 1].push_back(y - 1);
  }
  int k;
  cin >> k;
  vector<int> vers(k);
  for (int i = 0; i < k; ++i) cin >> vers[i];
  deque<int> q;
  vector<int> dist(n, inf);
  q.push_back(vers.back() - 1);
  dist[vers.back() - 1] = 0;
  while (q.size()) {
    int v = q.front();
    q.pop_front();
    for (auto &to : g[v]) {
      if (dist[to] > dist[v] + 1) {
        dist[to] = dist[v] + 1;
        q.push_back(to);
      }
    }
  }
  int ans_min = 0, ans_max = 0;
  for (int i = 0; i + 1 < k; ++i) {
    int len = k - i - 1;
    if (dist[vers[i + 1] - 1] + 1 != dist[vers[i] - 1]) {
      ++ans_min;
      ++ans_max;
    } else {
      int cnt = 0;
      for (auto &to : g1[vers[i] - 1]) {
        if (dist[to] + 1 == dist[vers[i] - 1]) ++cnt;
      }
      if (cnt >= 2) ++ans_max;
    }
  }
  cout << ans_min << " " << ans_max << endl;
  cerr << endl << (clock() - START_TIME) / CLOCKS_PER_SEC << " sec." << endl;
}
